Merge "Dark mode: Images should have background"

This commit is contained in:
jenkins-bot 2024-08-02 14:40:07 +00:00 committed by Gerrit Code Review
commit faa0ccdbd5
3 changed files with 35 additions and 1 deletions

View file

@ -24,7 +24,7 @@
},
{
"resourceModule": "skins.vector.styles",
"maxSize": "12.5 kB"
"maxSize": "13.0 kB"
},
{
"resourceModule": "skins.vector.js",

View file

@ -0,0 +1,33 @@
@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;
}
}
}
}
html.skin-theme-clientpref-night {
.dark-mode-image-styles();
}
@media ( prefers-color-scheme: dark ) {
html.skin-theme-clientpref-os {
.dark-mode-image-styles();
}
}

View file

@ -14,6 +14,7 @@
@import './normalize.less';
@import './typography.less';
@import './links.less';
@import './media.less';
// Components
@import './components/Dropdown.less';