You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: building/markdown/markdown.md
+28-12
Original file line number
Diff line number
Diff line change
@@ -149,16 +149,32 @@ You can test that your markdown comment gets removed by checking how your commen
149
149
- Inline HTML is allowed, but should be used sparingly
150
150
- Always use native markdown alternatives if available (e.g. use `# ...` rather than `<h1>...</h1>`)
151
151
152
+
## Images
153
+
154
+
As the website supports light and dark themes, community-submitted images must render well in both themes.
155
+
The solution to this is to suffix your image name (before the file extension):
156
+
157
+
1. Have the image name end in `-invertible` (e.g. `graph-invertible.svg`). The image will automatically be inverted when shown in the dark theme (via `filter: invert(100%)`).
158
+
1. Have the image name end in `-light` (e.g. `graph-light.png`) and also create dark-theme compatible version that ends in `-dark` (which would be `graph-dark.png`). We'll automatically render the correct image depending on the user's theme.
159
+
160
+
Images with neither suffix will be used without modifications across both themes.
161
+
This means that if you want to create grayscale images, you can generally make them look good on light theme, and then set them to be invertible.
162
+
But if you’re using an image with lots of colours, you might like to make two variants.
163
+
164
+
The full image name (including `-invertible`) should be added to the markdown where the image is rendered.
165
+
For light/dark ones, **ONLY** include the `-light` variant.
166
+
This logic is honoured across all markdown docs.
167
+
152
168
## Linters
153
169
154
170
There are various rules you can use to configure linters to meet this spec:
155
171
156
-
-[MD001][MD001]: Enable
157
-
-[MD002][MD002]: Enable
158
-
-[MD003][MD003]: Use `atx` style
159
-
-[MD004][MD004]: Use `dash` style
160
-
-[MD013][MD013]: Disable
161
-
-[MD033][MD033]: Disable
172
+
-[MD001][md001]: Enable
173
+
-[MD002][md002]: Enable
174
+
-[MD003][md003]: Use `atx` style
175
+
-[MD004][md004]: Use `dash` style
176
+
-[MD013][md013]: Disable
177
+
-[MD033][md033]: Disable
162
178
163
179
## Auto formatting
164
180
@@ -173,12 +189,12 @@ All the above can greatly help reduce churn in reviews, which is frustrating for
0 commit comments