MediaWiki:Common.css: Difference between revisions
EnWikiAdmin (talk | contribs) No edit summary Tag: Reverted |
EnWikiAdmin (talk | contribs) No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
/* CSS placed here will be applied to all skins */ | /* CSS placed here will be applied to all skins */ | ||
body { background-color: green !important; } | |||
.mw-wiki-logo { | |||
width: 100px !important; /* Ensure a fixed width */ | |||
max-width: 160px !important; | |||
height: auto !important; | |||
max-height: 160px !important; | |||
background-size: contain !important; | |||
background-position: center !important; | |||
background-repeat: no-repeat !important; | |||
} | |||
mw.loader.using('mediawiki.util').then(function() { | mw.loader.using('mediawiki.util').then(function() { | ||
if (mw.config.get('wgNamespaceNumber') === -1) { // -1 refers to Special pages | if (mw.config.get('wgNamespaceNumber') === -1) { // -1 refers to Special pages |
Revision as of 03:46, 4 November 2024
/* CSS placed here will be applied to all skins */
body { background-color: green !important; }
.mw-wiki-logo {
width: 100px !important; /* Ensure a fixed width */
max-width: 160px !important;
height: auto !important;
max-height: 160px !important;
background-size: contain !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
mw.loader.using('mediawiki.util').then(function() {
if (mw.config.get('wgNamespaceNumber') === -1) { // -1 refers to Special pages
var css = `
.mw-wiki-logo {
width: 100px !important;
max-width: 135px !important;
height: auto !important;
max-height: 135px !important;
background-size: contain !important;
background-position: center !important;
background-repeat: no-repeat !important;
}
`;
var style = document.createElement('style');
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
}
});