MediaWiki:Common.css: Difference between revisions

From Ikwipedia
No edit summary
Tag: Reverted
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 {
.mw-wiki-logo {
     width: 100px !important; /* Ensure a fixed width */
     width: 135px !important; /* Ensure a fixed width */
     max-width: 160px !important;
     max-width: 135px !important;
     height: auto !important;
     height: auto !important;
     max-height: 160px !important;
     max-height: 135px !important;
     background-size: contain !important;
     background-size: contain !important;
     background-position: center !important;
     background-position: center !important;

Revision as of 03:47, 4 November 2024

/* CSS placed here will be applied to all skins */

.mw-wiki-logo {
    width: 135px !important; /* Ensure a fixed width */
    max-width: 135px !important;
    height: auto !important;
    max-height: 135px !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);
    }
});