MediaWiki:Common.css: Difference between revisions

From The Taylor Archive
No edit summary
No edit summary
Line 1: Line 1:
/* 1. Reset base wrapper styling so empty containers stay invisible */
/* 1. Kill any pseudo-element boxes generated at the bottom of the navigation sidebar */
#mw-site-navigation .sidebar-inner {
#mw-site-navigation::before,
#mw-site-navigation::after,
#mw-site-navigation .sidebar-chunk::before,
#mw-site-navigation .sidebar-chunk::after,
.sidebar-chunk:last-child::before,
.sidebar-chunk:last-child::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
}
 
/* 2. Target any leftover un-clickable wrapper containers and strip their white card styling */
#mw-site-navigation > div:last-child,
#mw-site-navigation .sidebar-chunk:last-child,
#mw-related-navigation > div:last-child {
     background: transparent !important;
     background: transparent !important;
     border: none !important;
     border: none !important;
     box-shadow: none !important;
     box-shadow: none !important;
    min-height: 0 !important;
}
}


/* 2. Hide any sidebar chunk on main/content pages that lacks actual links */
/* 3. Re-apply the crisp white background only to populated chunks */
#mw-site-navigation .sidebar-chunk:not(:has(a)) {
#mw-site-navigation .sidebar-chunk {
     display: none !important;
     background: #ffffff;
}
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
 
/* 3. Explicitly hide the language and secondary tool containers when unpopulated */
#p-lang,
#p-lang-sidebar,
.mw-portlet-lang,
#p-tb-label {
    display: none !important;
}
}

Revision as of 19:22, 20 July 2026

/* 1. Kill any pseudo-element boxes generated at the bottom of the navigation sidebar */
#mw-site-navigation::before,
#mw-site-navigation::after,
#mw-site-navigation .sidebar-chunk::before,
#mw-site-navigation .sidebar-chunk::after,
.sidebar-chunk:last-child::before,
.sidebar-chunk:last-child::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
}

/* 2. Target any leftover un-clickable wrapper containers and strip their white card styling */
#mw-site-navigation > div:last-child,
#mw-site-navigation .sidebar-chunk:last-child,
#mw-related-navigation > div:last-child {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

/* 3. Re-apply the crisp white background only to populated chunks */
#mw-site-navigation .sidebar-chunk {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}