MediaWiki:Common.css: Difference between revisions

no edit summary
(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
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
.infobox-container {
    width: 30%;
    max-width: 350px; /* Prevents overly large infobox */
    margin-left: 15px;
    margin-top: 0px;
    float: right; /* Float on desktop */
    clear: right;
}


#mw-panel #toc {
/* Infobox Table */
     position: sticky;
.infobox-table {
     top: 10px; /* Distance from the top of the viewport */
     width: 100%;
     max-height: calc(100vh - 20px); /* Prevent overflow */
     border-collapse: collapse;
     overflow-y: auto; /* Enable scrolling for long TOCs */
     text-align: left;
     background: #f9f9f9;
}
     padding: 10px;
 
     border: 1px solid #ccc;
/* Image */
     border-radius: 4px;
.infobox-image {
     text-align: center;
    padding: 5px;
}
 
/* Headers */
.infobox-header, .infobox-section {
     background-color: #f2f2f2;
     font-weight: bold;
     text-align: center;
}
 
/* Fields */
.infobox-field {
     font-weight: bold;
    width: 35%;
}
}