mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-23 10:21:40 +00:00
Merge "Dark mode: Images should have background"
This commit is contained in:
commit
faa0ccdbd5
|
@ -24,7 +24,7 @@
|
|||
},
|
||||
{
|
||||
"resourceModule": "skins.vector.styles",
|
||||
"maxSize": "12.5 kB"
|
||||
"maxSize": "13.0 kB"
|
||||
},
|
||||
{
|
||||
"resourceModule": "skins.vector.js",
|
||||
|
|
33
resources/skins.vector.styles/media.less
Normal file
33
resources/skins.vector.styles/media.less
Normal 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();
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
@import './normalize.less';
|
||||
@import './typography.less';
|
||||
@import './links.less';
|
||||
@import './media.less';
|
||||
|
||||
// Components
|
||||
@import './components/Dropdown.less';
|
||||
|
|
Loading…
Reference in a new issue