mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-12 00:48:46 +00:00
Merge "Main page should work in night mode"
This commit is contained in:
commit
07b25670af
|
@ -78,3 +78,12 @@
|
|||
.night-mode-invert-image() {
|
||||
filter: invert( 1 ) hue-rotate( 180deg );
|
||||
}
|
||||
|
||||
/** This mixin should only be used where it's safe to do so. It should not be applied
|
||||
to content which may have important information. */
|
||||
.night-mode-strip-all-colors-when-safe() {
|
||||
background: inherit !important;
|
||||
color: inherit !important;
|
||||
/* If a border is defined retain it but make it black. If no border this won't do anything. */
|
||||
border-color: var( --border-color-subtle ) !important;
|
||||
}
|
||||
|
|
|
@ -17,4 +17,9 @@
|
|||
margin-top: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
& when (@wgMinervaApplyKnownTemplateHacks = 1) {
|
||||
@import 'hacks.less';
|
||||
}
|
||||
|
||||
// stylelint-enable selector-max-id
|
||||
|
|
13
resources/skins.minerva.mainPage.styles/hacks.less
Normal file
13
resources/skins.minerva.mainPage.styles/hacks.less
Normal file
|
@ -0,0 +1,13 @@
|
|||
.skin-night-mode-clientpref-1 .page-Main_Page {
|
||||
.mw-parser-output :not( .notheme ) {
|
||||
.night-mode-strip-all-colors-when-safe();
|
||||
}
|
||||
}
|
||||
|
||||
@media ( prefers-color-scheme: dark ) {
|
||||
.skin-night-mode-clientpref-2 .page-Main_Page {
|
||||
.mw-parser-output :not( .notheme ) {
|
||||
.night-mode-strip-all-colors-when-safe();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue