Commit bf57087
committed
Hide the dark mode button when printing
The dark mode button makes no sense in a printed document.
This change is slightly tricky because we used to hide the dark button
by default and only showed it when the JavaScript initialization ran
as expected, by setting the CSS `display` property to `block`.
However, doing that also meant that the `display` property could not be
overridden by a `@media print` block, because the `display` property was
set on the dark mode button itself, and would therefore always be more
specific than the `@media print` rule.
So let's instead use a CSS class to indicate whether the dark mode button
should be shown or not.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent fc03d14 commit bf57087
3 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | | - | |
| 654 | + | |
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
0 commit comments