Jump to content

MediaWiki:Common.css: Difference between revisions

From Global Wiki
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 19: Line 19:
}
}


/* === Enforce Desktop Layout on All Devices === */
/* Responsive layout adjustments */
body {
@media (max-width: 768px) {
     font-size: 16px !important;
     #mw-head-base,
     line-height: 1.6;
    #mw-panel,
     -webkit-text-size-adjust: none !important;
    #mw-navigation {
    overflow-x: hidden;
        display: none; /* Optional: hide sidebars on small screens */
    }
 
    #content,
    #bodyContent {
        margin: 0;
        padding: 10px;
        width: 100%;
     }
 
    h1, h2, h3 {
        font-size: 1.5em;
     }
 
    .mainpage-logo img {
        width: 100%;
        height: auto;
    }
}
}


html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}


.mw-body, #content, #bodyContent {
/* Improve text readability and spacing on mobile */
    width: 1024px !important;
@media (max-width: 768px) {
    margin: 0 auto !important;
    body, .mw-body {
     box-sizing: border-box;
        font-size: 14px;
    padding: 20px;
        line-height: 1.6;
}
    }
 
    h1, h2, h3, h4 {
        margin-top: 20px;
        margin-bottom: 10px;
     }
 
    /* Prevent horizontal overflow in code/pre */
    pre, code {
        white-space: pre-wrap;
        word-break: break-word;
    }


/* Restore sidebar and navigation */
    /* Ensure main content area uses full screen */
#mw-panel,
    .mw-body,
#mw-head-base,
    .mw-content-ltr,
#mw-navigation,
    #content {
.vector-menu-portal {
        box-sizing: border-box;
    display: block !important;
        padding: 10px;
}
        width: 100%;
    }


/* Prevent mobile font size shrink */
    /* Hide unnecessary portlets on mobile (optional) */
h1, h2, h3, h4, h5, p, a, li, td, th {
    .vector-menu-portal {
    font-size: inherit !important;
        display: none !important;
    }
}
}

Latest revision as of 16:54, 19 May 2025

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

/* Center and style the main page logo */
.mainpage-logo {
    text-align: center;
    margin: 20px 0;
}

.mainpage-logo img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* Responsive layout adjustments */
@media (max-width: 768px) {
    #mw-head-base,
    #mw-panel,
    #mw-navigation {
        display: none; /* Optional: hide sidebars on small screens */
    }

    #content,
    #bodyContent {
        margin: 0;
        padding: 10px;
        width: 100%;
    }

    h1, h2, h3 {
        font-size: 1.5em;
    }

    .mainpage-logo img {
        width: 100%;
        height: auto;
    }
}


/* Improve text readability and spacing on mobile */
@media (max-width: 768px) {
    body, .mw-body {
        font-size: 14px;
        line-height: 1.6;
    }

    h1, h2, h3, h4 {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    /* Prevent horizontal overflow in code/pre */
    pre, code {
        white-space: pre-wrap;
        word-break: break-word;
    }

    /* Ensure main content area uses full screen */
    .mw-body,
    .mw-content-ltr,
    #content {
        box-sizing: border-box;
        padding: 10px;
        width: 100%;
    }

    /* Hide unnecessary portlets on mobile (optional) */
    .vector-menu-portal {
        display: none !important;
    }
}