MediaWiki:Common.css: Difference between revisions

m Trying to adjust the icon for dark mode
m Added attribution
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
/*
* This file uses material from the Wikipedia/MediaWiki project,
* released under the Creative Commons Attribution-ShareAlike 4.0 International License.
* Source: https://en.wikipedia.org/wiki/MediaWiki:Common.css
*/
/*
/*
  * This is the CSS common to all desktop skins on en.Wikipedia.
  * This is the CSS common to all desktop skins on en.Wikipedia.
Line 345: Line 351:
/* @noflip */
/* @noflip */
text-align: right;
text-align: right;
}
/* Dark mode support for infoboxes */
@media screen {
html.skin-theme-clientpref-night .infobox {
background-color: #202122;
border-color: #54595d;
color: #eaecf0;
}
html.skin-theme-clientpref-night .infobox th,
html.skin-theme-clientpref-night .infobox td {
color: #eaecf0;
}
}
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .infobox {
background-color: #202122;
border-color: #54595d;
color: #eaecf0;
}
html.skin-theme-clientpref-os .infobox th,
html.skin-theme-clientpref-os .infobox td {
color: #eaecf0;
}
}
}


Line 412: Line 445:
}
}


.client-dark-mode .mw-wiki-logo {
/* Invert logo when user manually toggles dark mode */
html.skin-theme-clientpref-night .mw-logo-icon {
     filter: invert(1);
     filter: invert(1);
}
}
/* Invert logo when user's device is in dark mode (and wiki is set to "Automatic") */
@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .mw-logo-icon {
        filter: invert(1);
    }
}


/*
/*