MediaWiki:Common.css: Difference between revisions
Appearance
Style auto-generated ApprovedRevs notice as visible yellow box; force TOC expanded on mobile |
Mobile model: keep lead summary + full TOC visible at top; allow tap-to-expand sections (Wikipedia-like), per Theo 2026-06-30 |
||
| (One intermediate revision by the same user not shown) | |||
| Line 44: | Line 44: | ||
.client-js .toctogglecheckbox ~ .toctitle .toctogglespan { display: none; } | .client-js .toctogglecheckbox ~ .toctitle .toctogglespan { display: none; } | ||
.client-js .toctogglecheckbox:not(:checked) ~ ul { display: block !important; } | .client-js .toctogglecheckbox:not(:checked) ~ ul { display: block !important; } | ||
/* --- Mobile TOC visible at the top --- | |||
Model (validated 2026-06-30): like Wikipedia mobile, the lead summary boxes | |||
(KidsIntro + ExpertIntro) and the full TOC stay visible at the top. Tapping a | |||
section heading to expand its paragraphs is acceptable. So we only ensure the | |||
TOC sublist is shown; we do NOT force every section open. */ | |||
.toc .toctogglecheckbox ~ ul, | |||
.client-js .toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; } | |||
Latest revision as of 06:27, 30 June 2026
/* WikiDeal Common.css
Note: a previous attempt to force the Vector-2022 left menu open by
default broke the header layout — removed 2026-06-13.
Navigation is provided by: (1) the ☰ main menu, (2) the top key-links
bar (MediaWiki:Sitenotice), which works on desktop and mobile. */
/* --- Approved Revs status notice (auto-generated by the extension) ---
When a page has no approved revision, the extension shows the message
"This is the latest revision of this page; it has no approved revision."
inside #mw-content-subtitle, and adds .approvedRevs-noapprovedrev on body.
We style it as a clearly visible YELLOW box. When you approve the page,
the extension removes this message automatically — no manual cleanup. */
body.approvedRevs-noapprovedrev #mw-content-subtitle {
background: #fef9c3;
border: 1px solid #d4a800;
border-left: 5px solid #f0c000;
border-radius: 4px;
padding: 10px 16px;
margin: 12px 0 18px 0;
font-size: 0.95rem;
font-weight: 600;
color: #4a3a00;
}
body.approvedRevs-noapprovedrev #mw-content-subtitle::before {
content: "⚠️ ";
}
/* When approved & latest, or approved-not-latest, show a green box instead. */
body.approvedRevs-approved #mw-content-subtitle {
background: #dcfce7;
border: 1px solid #16a34a;
border-left: 5px solid #16a34a;
border-radius: 4px;
padding: 10px 16px;
margin: 12px 0 18px 0;
font-size: 0.95rem;
font-weight: 600;
color: #14532d;
}
/* --- Table of contents: always expanded on mobile (MobileFrontend) ---
By default MobileFrontend collapses the TOC behind a clickable title.
Force it open so chapter headings are visible without tapping. */
.toc, #toc, .mw-references-wrap { display: block !important; }
.client-js .toctogglecheckbox ~ .toctitle .toctogglespan { display: none; }
.client-js .toctogglecheckbox:not(:checked) ~ ul { display: block !important; }
/* --- Mobile TOC visible at the top ---
Model (validated 2026-06-30): like Wikipedia mobile, the lead summary boxes
(KidsIntro + ExpertIntro) and the full TOC stay visible at the top. Tapping a
section heading to expand its paragraphs is acceptable. So we only ensure the
TOC sublist is shown; we do NOT force every section open. */
.toc .toctogglecheckbox ~ ul,
.client-js .toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; }