Jump to content

MediaWiki:Common.css: Difference between revisions

From Global Wiki
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
}
}


/* === Force desktop view even on mobile === */
/* Responsive layout adjustments */
html {
@media (max-width: 768px) {
     zoom: 1 !important;
    #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;
    }
}
}


body, .mw-body {
    font-size: 16px !important;
    line-height: 1.6;
    -webkit-text-size-adjust: none !important;
}


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


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


/* Logo scaling */
    /* Hide unnecessary portlets on mobile (optional) */
.mainpage-logo img {
    .vector-menu-portal {
    width: auto;
        display: none !important;
     height: auto;
     }
    max-width: 100%;
}
}

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;
    }
}