MediaWiki:Common.css: Difference between revisions

From GladiusRO Wiki
Jump to navigation Jump to search
Created page with "CSS placed here will be applied to all skins: ========================================================= GLADIUSRO WIKI - LEFT-SIDE TABLE OF CONTENTS =========================================================: #gladius-left-toc { position: fixed; top: 150px; left: 10px; z-index: 50; box-sizing: border-box; width: 270px; max-height: calc(100vh - 170px); overflow-x: hidden; overflow-y: auto; background: #ffffff;..."
 
No edit summary
Line 123: Line 123:
         margin-left: initial;
         margin-left: initial;
     }
     }
}
/*
* GladiusRO TOC placement adjustment.
* Keep the TOC below the sidebar logo.
*/
#gladius-sidebar-toc {
    clear: both;
    margin-top: 10px;
    margin-bottom: 14px;
}
/*
* Keep the sidebar logo above the TOC.
*/
#mw-panel img,
#mw-navigation img,
.sidebar img {
    position: relative;
    z-index: 1;
}
}

Revision as of 02:34, 2 August 2026

/* CSS placed here will be applied to all skins */
/* =========================================================
   GLADIUSRO WIKI - LEFT-SIDE TABLE OF CONTENTS
   ========================================================= */

#gladius-left-toc {
    position: fixed;
    top: 150px;
    left: 10px;
    z-index: 50;

    box-sizing: border-box;
    width: 270px;
    max-height: calc(100vh - 170px);

    overflow-x: hidden;
    overflow-y: auto;

    background: #ffffff;
    border: 1px solid #c8ccd1;
    border-radius: 3px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

/* Remove the original TOC spacing */
#gladius-left-toc #toc {
    display: block !important;
    box-sizing: border-box;

    width: 100%;
    margin: 0;
    padding: 12px;

    background: transparent;
    border: 0;
    font-size: 13px;
}

/* Contents heading */
#gladius-left-toc #toc .toctitle {
    position: sticky;
    top: 0;
    z-index: 2;

    margin: -12px -12px 10px;
    padding: 10px 12px;

    background: #f8f9fa;
    border-bottom: 1px solid #c8ccd1;
    text-align: left;
}

#gladius-left-toc #toc .toctitle h2 {
    display: inline-block;
    margin: 0;
    padding: 0;

    color: #202122;
    font-size: 14px;
    font-weight: 600;
}

/* TOC list */
#gladius-left-toc #toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#gladius-left-toc #toc ul ul {
    margin-top: 4px;
    margin-left: 14px;
}

#gladius-left-toc #toc li {
    margin: 5px 0;
    padding: 0;
    line-height: 1.35;
}

#gladius-left-toc #toc a {
    display: block;
    color: #2456c4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#gladius-left-toc #toc a:hover {
    color: #153b91;
    text-decoration: underline;
}

/* Keep section numbers beside the section name */
#gladius-left-toc .tocnumber,
#gladius-left-toc .toctext {
    display: inline;
}

/* Give the article enough space for the left TOC */
body.gladius-has-left-toc #content {
    margin-left: 300px;
}

/* Some skins use these containers */
body.gladius-has-left-toc .mw-body {
    margin-left: 300px;
}

/* Tablet and mobile: return TOC to normal article position */
@media screen and (max-width: 1100px) {
    #gladius-left-toc {
        position: static;
        width: auto;
        max-height: none;
        margin: 15px 0;
        overflow: visible;
        box-shadow: none;
    }

    body.gladius-has-left-toc #content,
    body.gladius-has-left-toc .mw-body {
        margin-left: initial;
    }
}

/*
 * GladiusRO TOC placement adjustment.
 * Keep the TOC below the sidebar logo.
 */
#gladius-sidebar-toc {
    clear: both;
    margin-top: 10px;
    margin-bottom: 14px;
}

/*
 * Keep the sidebar logo above the TOC.
 */
#mw-panel img,
#mw-navigation img,
.sidebar img {
    position: relative;
    z-index: 1;
}