MediaWiki:Common.css: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 149:
 
/* ======================================================= */
/* RESTORED CAPSACH TOC (Fixed: Top-RightNo Dropdown)"X", Clear Title) */
/* ======================================================= */
 
Line 155:
#cps-open-toc {
position: fixed;
/* (These styles are now handled by the Floating Squares section,
but we keep basic reset here just in case) */
display: none;
}
Line 163 ⟶ 161:
#cps-toc-overlay {
position: fixed; inset: 0;
background: rgba(0,0,0,0.24);
/* Slightly darker to focus attention on the menu */
background: rgba(0,0,0,0.2);
display: none;
z-index: 1004; /* Below the panel, above the buttons */
}
#cps-toc-overlay.is-open { display: block; }
 
/* --- THE DROPDOWN PANEL (MOVED TO TOP RIGHT) --- */
#cps-toc-panel {
position: fixed;
/* POSITION: 60px from top (ClearBelow of the headerButtons) */
top: 60px !important;
/* POSITION:FULL Aligned with the buttonWIDTH */
rightleft: 10px0 !important;
leftright: auto0 !important;
bottom: auto !important; /* Crucial: Detach from bottom */
displaywidth: none100% !important;
/* SIZE: Fixed width card instead of full width */
max-width: 300px100% !important;
max-width: 90vw !important; /* Safety for small screens */
max-height: 80vh !important;
/* APPEARANCE:HEIGHT FloatingCONSTRAINT Card(Ad Safety) */
bordermax-radiusheight: 12pxcalc(100vh - 180px) !important;
/* APPEARANCE */
maxborder-heightradius: 80vh0 0 12px 12px !important;
background: #ffffff !important;
color: #202122 !important;
box-shadow: 0 4px10px 20px30px rgba(0,0,0,0.2515) !important;
padding: 12px15px !important; /* Slightly more padding for aesthetics */
box-sizing: border-box !important;
/* SCROLLING */
Line 200 ⟶ 199:
/* VISIBILITY */
z-index: 1005 !important; /* Must be highest */
display: none; /* Hidden by default */
}
 
/* Logic to show panel (usually handled by JS toggling a class, */
but ensuring display block when active) */
.is-open #cps-toc-panel,
#cps-toc-overlay.is-open + #cps-toc-panel, /* Fallback selector */
#cps-toc-panel[style*="display: block"] {
display: block !important;
}
 
/* --- HEADER ROW (The Title) --- */
/* Header row */
#cps-toc-header {
display: flex; align-items: center!important; justify-content: space-between;
align-items: center !important;
margin-bottom: 8px;
justify-content: center !important; /* Center text */
border-bottom: 1px solid #eee;
padding-bottom: 8px;
/* SEPARATOR LINE */
border-bottom: 1px2px solid #eeeeaecf0 !important;
margin-bottom: 8px10px !important;
padding-bottom: 8px12px !important;
}
 
#cps-toc-title { font-size: 16px; font-weight: 700; margin: 0; color: #000; }
/* TITLE STYLING (Bold & Clear) */
#cps-toc-panel h2title {
font-size: 18px !important;
font-weight: 800 !important; /* Extra Bold */
margin: 0 !important;
color: #000 !important;
text-align: center !important;
letter-spacing: 0.5px;
 
/* HIDE THE CLOSE BUTTON ("X") */
#cps-toc-close {
display: none !important;
background: transparent; border: 0; font-size: 24px; line-height: 1;
color: #666; padding: 0 8px;
}
 
/* List--- StylingLIST STYLING --- */
#cps-toc-list {
list-style: none; margin: 0; padding: 0;
Line 231 ⟶ 243:
#cps-toc-list li { margin: 0; }
#cps-toc-list a {
display: block; padding: 12px 10px;
border-radiusbottom: 6px1px solid #f8f8f8;
text-decoration: none;
color: #202122;
font-size: 14px15px;
line-height: 1.4;
}
Line 243 ⟶ 255:
}
 
/* Indentation by heading level */
#cps-toc-list li[data-level="3"] { padding-left: 10px15px; }
#cps-toc-list li[data-level="4"] { padding-left: 20px30px; }
#cps-toc-list li[data-level="5"] { padding-left: 30px45px; }
#cps-toc-list li[data-level="6"] { padding-left: 40px; }
 
/* Only show on phone-ish widths */
Line 253 ⟶ 264:
#cps-open-toc, #cps-toc-overlay, #cps-toc-panel { display: none !important; }
}
 
/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
}
 
/* FIX: HIDE DUPLICATE "CONTENTS" TITLE IN MOBILE TOC */
/* ======================================================= */
/* FIX: HIDE DUPLICATE "CONTENTS" TITLE IN MOBILE TOC */
/* ======================================================= */
#cps-toc-panel .toctitle,
#cps-toc-panel #mw-toc-heading,
#cps-toc-panel h2 {
display: none !important;
 
/* ======================================================= */
/* FIX: HIDE DUPLICATE "CONTENTS" TITLE IN MOBILE TOC */
/* ======================================================= */
 
/* This hides the original MediaWiki header inside your custom panel */
#cps-toc-panel .toctitle,
#cps-toc-panel #mw-toc-heading,
Line 505 ⟶ 501:
/* TOC Icon */
#cps-open-toc .icon { font-size: 24px !important; }
 
/* FIX: Ensure no text label appears in button */
#cps-open-toc .label { display: none !important; }
 
/* --- E. BUTTON 3: HOME (LEFT OF TOC) --- */