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

MediaWiki:Common.css: Difference between revisions

From WikiDeal
Demo (additive, scoped to one page): move ApprovedRevs banner to bottom on Innovations:Main for Theo review
ApprovedRevs banner: bottom on all pages + discreet approved style (Theo 2026-08-19)
 
Line 53: Line 53:
.client-js .toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; }
.client-js .toc .toctogglecheckbox ~ ul { visibility: visible !important; height: auto !important; }


/* --- DEMO 2026-08-17 (review Theo): ApprovedRevs banner moved to the BOTTOM ---
/* --- ApprovedRevs banner moved to the BOTTOM on ALL pages (Theo, 2026-08-19) ---
  Scope: ONE page only (Gov/en/Portal:R&D/Innovations:Main, desktop Vector 2022).
   The status message is rendered in #contentSub (#mw-content-subtitle) above the
   The ApprovedRevs status message is rendered in #contentSub (#mw-content-subtitle),
   article. We turn #bodyContent into a flex column and reorder its children so
   above the article. This demo turns #bodyContent into a flex column and reorders
  the banner appears after the article, just before the category links.
  its children so the banner appears after the article, just before the category
   Scoped to normal page views (action-view) to avoid side effects on edit/special pages. */
   links. On mobile (Minerva) the subtitle sits outside #bodyContent, so this rule
body.action-view #bodyContent { display: flex; flex-direction: column; }
  has no effect there. Remove this whole block to revert. */
body.action-view #contentSub { order: 2; margin-top: 1.5em; }
body.page-Gov_en_Portal_R_D_Innovations_Main #bodyContent { display: flex; flex-direction: column; }
body.action-view #catlinks { order: 3; }
body.page-Gov_en_Portal_R_D_Innovations_Main #contentSub { order: 2; margin-top: 1.5em; }
 
body.page-Gov_en_Portal_R_D_Innovations_Main #catlinks { order: 3; }
/* Approved & latest: discreet small grey line instead of a green box. */
body.approvedRevs-approved #mw-content-subtitle {
    background: none;
    border: none;
    border-radius: 0;
    padding: 4px 0;
    margin: 8px 0 0 0;
    font-size: 0.82rem;
    font-weight: normal;
    font-style: italic;
    color: #6b7280;
}

Latest revision as of 08:03, 19 August 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; }

/* --- ApprovedRevs banner moved to the BOTTOM on ALL pages (Theo, 2026-08-19) ---
   The status message is rendered in #contentSub (#mw-content-subtitle) above the
   article. We turn #bodyContent into a flex column and reorder its children so
   the banner appears after the article, just before the category links.
   Scoped to normal page views (action-view) to avoid side effects on edit/special pages. */
body.action-view #bodyContent { display: flex; flex-direction: column; }
body.action-view #contentSub { order: 2; margin-top: 1.5em; }
body.action-view #catlinks { order: 3; }

/* Approved & latest: discreet small grey line instead of a green box. */
body.approvedRevs-approved #mw-content-subtitle {
    background: none;
    border: none;
    border-radius: 0;
    padding: 4px 0;
    margin: 8px 0 0 0;
    font-size: 0.82rem;
    font-weight: normal;
    font-style: italic;
    color: #6b7280;
}