Jump to content
Gov  ·  Market  ·  Community  ·  Policies  ·  Funding  ·  Open Call  ·  Get started

MediaWiki:Common.css: Difference between revisions

From WikiDeal
TEST: force Vector-2022 main menu open (reversible, investigation)
 
Mobile model: keep lead summary + full TOC visible at top; allow tap-to-expand sections (Wikipedia-like), per Theo 2026-06-30
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* TEST: force Vector-2022 main menu dropdown open (reversible). AI-Admin-Assistant 2026-06-13 */
/* WikiDeal Common.css
@media screen and (min-width: 1000px) {
  Note: a previous attempt to force the Vector-2022 left menu open by
  #vector-main-menu-dropdown-checkbox ~ .vector-dropdown-content,
  default broke the header layout — removed 2026-06-13.
  .vector-main-menu-dropdown .vector-dropdown-content {
  Navigation is provided by: (1) the ☰ main menu, (2) the top key-links
     opacity: 1 !important;
  bar (MediaWiki:Sitenotice), which works on desktop and mobile. */
     visibility: visible !important;
 
     height: auto !important;
/* --- Approved Revs status notice (auto-generated by the extension) ---
     position: static !important;
  When a page has no approved revision, the extension shows the message
     box-shadow: none !important;
  "This is the latest revision of this page; it has no approved revision."
     max-width: none !important;
  inside #mw-content-subtitle, and adds .approvedRevs-noapprovedrev on body.
     max-height: none !important;
  We style it as a clearly visible YELLOW box. When you approve the page,
     padding: 8px 0 !important;
  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; }

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; }