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

MediaWiki:Common.css: Difference between revisions

From WikiDeal
Vector-2022: nav menu always visible by default on desktop (force-open dropdown as static column)
Mobile model: keep lead summary + full TOC visible at top; allow tap-to-expand sections (Wikipedia-like), per Theo 2026-06-30
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ===================================================================
/* WikiDeal Common.css
   WikiDeal navigation always visible (AI-Admin-Assistant, 2026-06-13)
   Note: a previous attempt to force the Vector-2022 left menu open by
   Goal (Théo): left nav menu (Gov · Market · User Groups · Recent
  default broke the header layout removed 2026-06-13.
   changes · Get started + Key links) must be visible BY DEFAULT on
   Navigation is provided by: (1) the ☰ main menu, (2) the top key-links
  Vector-2022 desktop, without clicking the ☰ button.
   bar (MediaWiki:Sitenotice), which works on desktop and mobile. */


  How: Vector-2022 keeps the main-menu markup inside an "unpinned"
/* --- Approved Revs status notice (auto-generated by the extension) ---
   dropdown that is hidden via the checkbox-hack. On wide screens we
  When a page has no approved revision, the extension shows the message
   force that dropdown open and lay it out as a static left column
  "This is the latest revision of this page; it has no approved revision."
  (instead of a floating panel). Reversible: delete this block.
   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;
}


  Mobile (Minerva/MobileFrontend) is a different skin and ignores
/* --- Table of contents: always expanded on mobile (MobileFrontend) ---
   this; mobile nav is covered by MediaWiki:Sitenotice (top link bar).
   By default MobileFrontend collapses the TOC behind a clickable title.
   =================================================================== */
   Force it open so chapter headings are visible without tapping. */
@media screen and (min-width: 1000px) {
.toc, #toc, .mw-references-wrap { display: block !important; }
  /* Force the main-menu dropdown content open and inline it */
.client-js .toctogglecheckbox ~ .toctitle .toctogglespan { display: none; }
  .vector-main-menu-dropdown .vector-dropdown-content {
.client-js .toctogglecheckbox:not(:checked) ~ ul { display: block !important; }
    opacity: 1 !important;
 
    visibility: visible !important;
/* --- Mobile TOC visible at the top ---
    height: auto !important;
  Model (validated 2026-06-30): like Wikipedia mobile, the lead summary boxes
    position: static !important;
  (KidsIntro + ExpertIntro) and the full TOC stay visible at the top. Tapping a
    box-shadow: none !important;
  section heading to expand its paragraphs is acceptable. So we only ensure the
    background: transparent !important;
  TOC sublist is shown; we do NOT force every section open. */
    max-width: none !important;
.toc .toctogglecheckbox ~ ul,
    max-height: none !important;
.client-js .toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; }
    overflow: visible !important;
    padding: 4px 0 0 0 !important;
  }
  /* The ☰ toggle button is now redundant on wide screens — hide it */
  #vector-main-menu-dropdown-checkbox,
  .vector-main-menu-dropdown .vector-dropdown-label {
    display: none !important;
  }
  /* Hide the "Main menu / move to sidebar / hide" pinnable header row
    (it only makes sense in the collapsible flow) */
  .vector-main-menu-pinnable-header {
    display: none !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; }