mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-11 15:37:50 +00:00
b3ca12e628
Prevents dark-mode styles from affecting print media by adding `@media screen` to dark-mode related styles. Bug: T371331 Change-Id: I2ed7fbfc078c6d738c13a71c677783f7ccea2582
36 lines
778 B
Plaintext
36 lines
778 B
Plaintext
@import 'mediawiki.skin.variables.less';
|
|
|
|
.dark-mode-image-styles() {
|
|
/* Desktop legacy HTML */
|
|
.mw-parser-output,
|
|
/* Parsoid HTML (mobile) */
|
|
section .mw-heading ~ div,
|
|
/* Parsoid HTML (desktop) and mobile legacy HTML */
|
|
section,
|
|
/* e.g. https://en.wikipedia.org/wiki/Pullback_(category_theory)#Universal_property */
|
|
dd,
|
|
/* For targeting p span.mw-default-size */
|
|
p {
|
|
> span.mw-default-size,
|
|
> figure[ typeof='mw:File' ],
|
|
> figure[ typeof='mw:File/Thumb' ],
|
|
> figure[ typeof='mw:File/Frameless' ] {
|
|
img {
|
|
background-color: #c8ccd1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen {
|
|
html.skin-theme-clientpref-night {
|
|
.dark-mode-image-styles();
|
|
}
|
|
}
|
|
|
|
@media screen and ( prefers-color-scheme: dark ) {
|
|
html.skin-theme-clientpref-os {
|
|
.dark-mode-image-styles();
|
|
}
|
|
}
|