MediaWiki:Common.css: Difference between revisions

From PoliticalSG
(Created page with "→‎CSS placed here will be applied to all skins: #mw-panel #toc { position: sticky; top: 10px; →‎Distance from the top of the viewport: max-height: calc(100vh - 20px); →‎Prevent overflow: overflow-y: auto; →‎Enable scrolling for long TOCs: background: #f9f9f9; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }")
 
No edit summary
Line 2: Line 2:


#mw-panel #toc {
#mw-panel #toc {
    position: sticky;
     top: 10px; /* Distance from the top of the viewport */
     top: 10px; /* Distance from the top of the viewport */
     max-height: calc(100vh - 20px); /* Prevent overflow */
     max-height: calc(100vh - 20px); /* Prevent overflow */

Revision as of 17:25, 16 November 2024

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

#mw-panel #toc {
    top: 10px; /* Distance from the top of the viewport */
    max-height: calc(100vh - 20px); /* Prevent overflow */
    overflow-y: auto; /* Enable scrolling for long TOCs */
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}