MediaWiki:Common.css: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 149:
/* ======================================================= */
/* RESTORED CAPSACH TOC (
/* ======================================================= */
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) */
/* POSITION: Right side */▼
border: 0; border-radius: 999px;▼
display: none;
font-size: 14px; font-weight: 600;▼
color: #fff; background: rgba(0,0,0,.1);▼
/* box-shadow: 0 2px 8px rgba(0,0,0,.0);*/▼
}
/* Full-screen scrim (Click outside to close) */▼
#cps-open-toc .label { display: none; } /* icon-only by default */▼
▲/* Full-screen scrim */
#cps-toc-overlay {
position: fixed; inset: 0;
/* Slightly darker to focus attention on the menu */
background: rgba(0,0,0,.1);▼
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;
max-height: 85vh;▼
/* POSITION: 60px from top (Clear of the header) */
border-radius: 12px 12px 0 0;▼
top: 60px !important;
background: #fff; color: #202122;▼
right: 10px !important;
left: auto !important;
bottom: auto !important; /* Crucial: Detach from bottom */
/* SIZE: Fixed width card instead of full width */
width: 300px !important;
max-width: 90vw !important; /* Safety for small screens */
max-height: 80vh !important;
/* APPEARANCE: Floating Card */
color: #202122 !important;
padding: 12px !important;
/* SCROLLING */
overflow-y: auto !important;
/* VISIBILITY */
z-index: 1005 !important; /* Must be highest */
}
/* 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;
}
Line 202 ⟶ 215:
#cps-toc-header {
display: flex; align-items: center; justify-content: space-between;
margin-bottom:
border-bottom: 1px solid #eee;
padding-bottom: 8px;
}
#cps-toc-title { font-size: 16px; font-weight:
#cps-toc-close {
background: transparent; border: 0; font-size:
color: #666; padding: 0 8px;
}
/* List Styling */
#cps-toc-list {
list-style: none; margin: 0; padding:
▲ max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#cps-toc-list li { margin:
#cps-toc-list a {
display: block; padding:
text-decoration: none;
}
color: #3366cc;
}
/* Indentation by heading level */
#cps-toc-list li[data-level="3"] { padding-left:
#cps-toc-list li[data-level="4"] { padding-left:
#cps-toc-list li[data-level="5"] { padding-left:
#cps-toc-list li[data-level="6"] { padding-left:
/* Only show on phone-ish widths
@media (min-width: 768px) {
#cps-open-toc, #cps-toc-overlay, #cps-toc-panel { display: none !important; }
}
Line 237 ⟶ 257:
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
}
/* ======================================================= */
/* 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;
}
| |||