MediaWiki:Common.css: Difference between revisions
Appearance
Style auto-generated ApprovedRevs notice as visible yellow box; force TOC expanded on mobile |
Force mobile sections + TOC always expanded (Common.css is the loaded file; Mobile.css is not loaded by this wiki) |
||
| 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 sections always expanded (no tap-to-open) --- | |||
MobileFrontend (Minerva) wraps each section in a collapsible block and clips | |||
it with content-visibility:hidden until tapped. WikiDeal wants every paragraph | |||
readable on first load, like a fully open desktop article. Force them open. | |||
Loaded via site.styles (this wiki does not load MediaWiki:Mobile.css). */ | |||
.collapsible-block, | |||
.collapsible-block-js, | |||
section.mf-section-1, | |||
section.mf-section-2, | |||
section.mf-section-3, | |||
section.mf-section-4 { | |||
display: block !important; | |||
height: auto !important; | |||
max-height: none !important; | |||
overflow: visible !important; | |||
visibility: visible !important; | |||
content-visibility: visible !important; | |||
} | |||
/* Unhide the TOC sublist that Minerva collapses behind its checkbox. */ | |||
.client-js .toc .toctogglecheckbox ~ ul, | |||
.toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; } | |||
/* Hide the open/close arrow so headings read as plain titles. */ | |||
.collapsible-heading .indicator, | |||
.section-heading .indicator { display: none !important; } | |||
Revision as of 06:24, 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 sections always expanded (no tap-to-open) ---
MobileFrontend (Minerva) wraps each section in a collapsible block and clips
it with content-visibility:hidden until tapped. WikiDeal wants every paragraph
readable on first load, like a fully open desktop article. Force them open.
Loaded via site.styles (this wiki does not load MediaWiki:Mobile.css). */
.collapsible-block,
.collapsible-block-js,
section.mf-section-1,
section.mf-section-2,
section.mf-section-3,
section.mf-section-4 {
display: block !important;
height: auto !important;
max-height: none !important;
overflow: visible !important;
visibility: visible !important;
content-visibility: visible !important;
}
/* Unhide the TOC sublist that Minerva collapses behind its checkbox. */
.client-js .toc .toctogglecheckbox ~ ul,
.toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; }
/* Hide the open/close arrow so headings read as plain titles. */
.collapsible-heading .indicator,
.section-heading .indicator { display: none !important; }