MediaWiki:Common.css: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
(20 intermediate revisions by the same user not shown)
Line 3:
Applies read-only mode, branding, navigation, and AI assistant.
Logged-in overrides live in MediaWiki:Group-user.css
MANAGED WHOLESALE: replace the entire page from the canonical file
(temp/design/common_css_clean.css) — no incremental block pastes.
Color/typography authority: SECTION 12 owns all heading, link,
footer, table and AI-panel colors; earlier sections are structure.
================================================================= */
 
Line 108 ⟶ 112:
.mw-special-Book #coll-downloadbox { display: none; }
 
/* --- Infoboxes ---(structure *only — width/border/background/font owned
by section 12) --- */
.infobox {
border: 1px solid #a2a9b1; color: black; padding: 0.2em;
font-size: 88%; line-height: 1.5em; border-spacing: 3px;
}
@media screen(max-width: 640px) { .infobox .nowrap { backgroundwhite-colorspace: #f8f9fanormal; } }
@media (max-width: 640px) { .infobox { width: 100%; } .infobox .nowrap { white-space: normal; } }
@media (min-width: 640px) {
.infobox { margin: 0.5em 0 0.5em 1em; float: right; clear: right; width: 22em; }
}
.infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data,
Line 165 ⟶ 169:
}
 
/* --- Header reset (invisible fixed container for floating buttons) --- */
.header-container.header-chrome {
position: fixed !important;
Line 172 ⟶ 176:
z-index: 1000 !important;
pointer-events: none !important;
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
 
/* Transparent header (Minerva) */
.header-container.header-chrome,
.minerva-header {
background: transparent !important;
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
Line 647 ⟶ 650:
#p-vector-user-menu-preferences { display: none !important; }
.vector-main-menu-landmark { display: none !important; }
 
/* --- Color theme (anonymous only) --- */
body:not(.group-user) #skin-client-prefs-skin-theme { display: none !important; }
 
/* --- Mobile: history bar --- */
Line 678:
 
/* =================================================================
7. TYPOGRAPHYCHROME & LINKSEXTRAS
(Heading, link, and footer COLORS are owned by section 12 —
this section keeps only structural chrome fixes.)
================================================================= */
 
/* --- Heading colors --- */
.mw-heading1, h1,
.mw-heading2, h2,
h3, h4, h5, h6,
.firstHeading,
.mw-page-title-main,
.page-heading,
.section-heading,
.vector-sticky-header-context-bar-primary,
.mw-headline,
.vector-pinnable-header-label {
color: #202122 !important;
}
 
/* --- Heading borders --- */
.mw-heading1, h1,
.mw-heading2, h2,
.section-heading {
border-bottom: 1px solid #202122 !important;
margin-bottom: 0.6em;
}
 
.mw-first-heading {
border-bottom: 2px solid #202122 !important;
margin-bottom: 0.5em;
}
 
/* Remove Vector 2022 default title underline */
Line 713 ⟶ 688:
display: none !important;
height: 0 !important;
}
 
/* Contents sidebar heading (no border) */
h2.vector-pinnable-header-label { border-bottom: none !important; }
 
/* --- Link colors (legacy blue #1d70b8) --- */
a,
a:visited,
.mw-parser-output a,
.mw-parser-output a:visited,
.mw-body-content a.external,
.mw-body-content a.external:visited,
.mw-collapsible-toggle-default .mw-collapsible-text {
color: #000099 !important;
}
 
/* Red links (missing pages) */
a.new,
a.new:visited { color: #d73333 !important; }
 
/* UI buttons stay white */
a.mw-ui-button,
a.mw-ui-button:visited { color: #fff !important; }
 
/* --- Edit section links --- */
.mw-editsection, .mw-editsection a {
color: #202122 !important;
opacity: 0.7;
}
 
/* --- Footer borders --- */
#footer,
.mw-footer,
.minerva-footer,
.printfooter {
border-top: 1px solid #202122 !important;
}
 
Line 806 ⟶ 745:
padding: 0 4px;
border-radius: 3px;
}
 
/* --- Minerva bullet indentation fix --- */
body.skin-minerva .mw-parser-output ul,
body.skin-minerva .collapsible-block ul {
padding-left: 1em;
margin-left: 0;
}
body.skin-minerva .mw-parser-output ul ul,
body.skin-minerva .collapsible-block ul ul {
padding-left: 1em;
}
 
 
/* =================================================================
8. AI ASSISTANT PANEL — STRUCTURE
(Panel colors — borders, bubbles, send button, citations — are
owned by section 12's theme block.)
================================================================= */
 
Line 830 ⟶ 760:
}
 
.ext-aiassistant-panel { box-shadow: none !important; }
/* --- Panel shell --- */
.ext-aiassistant-panel {
border: 1px solid #202122 !important;
box-shadow: none !important;
}
 
/* --- Header --- */
.ext-aiassistant-header {
border-bottom: 1px solid #202122 !important;
margin-left: 0 !important;
margin-right: 0 !important;
Line 869 ⟶ 794:
 
.ext-aiassistant-message-user .ext-aiassistant-message__content {
background-color: #202122 !important;
color: white !important;
border-radius: 18px !important;
Line 881 ⟶ 805:
}
 
/* --- Assistant typography (matchesfamily/color articleset styleby section 12) --- */
.ext-aiassistant-message-assistant {
font-family: sans-serif !important;
font-size: 1em !important;
color: #202122 !important;
overflow-wrap: break-word !important;
white-space: normal !important;
Line 946 ⟶ 868:
}
 
/* --- Citations (color set by section 12) --- */
.ext-aiassistant-cite {
line-height: 1 !important;
Line 962 ⟶ 884:
}
 
/* --- "New Chat" label (color set by section 12) --- */
.ext-aiassistant-panel .cdx-button--weight-quiet:not(.cdx-button--icon-only) {
font-size: 0 !important;
Line 970 ⟶ 892:
font-size: 0.875rem !important;
font-weight: bold !important;
color: #202122 !important;
visibility: visible !important;
}
Line 976 ⟶ 897:
/* --- Footer + Composer --- */
.ext-aiassistant-footer {
border-top: 1px solid #202122 !important;
display: flex !important;
align-items: center !important;
Line 982 ⟶ 902:
padding: 0 !important;
box-sizing: border-box !important;
background-color: #f8f9fa !important;
}
 
Line 999 ⟶ 918:
}
 
/* --- ComposerSend focusbutton (shape; colors set by section 12) --- */
.ext-aiassistant-prompt-composer:focus-within .ext-aiassistant-prompt-composer__input,
.ext-aiassistant-prompt-composer__input:focus {
border-color: #202122 !important;
outline: none !important;
box-shadow: none !important;
}
 
/* --- Send button --- */
.ext-aiassistant-prompt-composer__send {
border-radius: 50% !important;
Line 1,018 ⟶ 929:
justify-content: center !important;
margin-left: 4px !important;
}
 
.ext-aiassistant-prompt-composer__send:not(:disabled) {
background-color: #202122 !important;
border-color: #202122 !important;
color: #ffffff !important;
}
 
.ext-aiassistant-prompt-composer__send:disabled {
background-color: #EAECF0 !important;
border-color: #EAECF0 !important;
}
 
Line 1,064 ⟶ 964:
.ext-aiassistant-footer {
padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
}
 
/* Add a line to separate with the sticky buttons */
.ext-aiassistant-prompt-composer {
border-bottom: 1px solid #202122 !important;
border-radius: 0 !important;
padding-bottom: 10px !important;
}
 
Line 1,093 ⟶ 986:
/* --- Tablet (min-width: 768px) --- */
@media screen and (min-width: 768px) {
/* LockKeep homeToC button shapevisible above panel overlays */
.branding-box {
width: 44px !important;
min-width: 44px !important;
max-width: 44px !important;
flex: 0 0 44px !important;
margin-left: -86px !important;
}
 
/* Keep ToC centered */
#cps-open-toc {
display: flex !important;
visibility: visible !important;
opacity: 1 !important;
z-index: 9999 !important;
margin-left: -22px !important;
background-color: rgba(0, 0, 0, 0.2) !important;
width: 44px !important;
height: 44px !important;
border-radius: 50% !important;
}
}
Line 1,322 ⟶ 1,199:
 
/* =================================================================
12. EDITORIAL DESIGN SYSTEM v10v11 ("paper & ink")
Appended LAST deliberately: later rules of equal specificity win,
so this section restyles typography / color / spacing WITHOUT
Line 1,328 ⟶ 1,205:
color variables from here — a later :root wins). Delete the whole
section to revert.
v11: full-sheet cleanup — sections 7/8 stripped to structure (this
v10: markers drawn at EXACT positions — each level's marker sits on
section is the single color authority); TOC block consolidated
its parent's text axis (level 1 on the heading axis); shapes
(numbers in a fixed right-aligned gutter, "0." on Beginning,
bullet / triangle / en dash, optically equal sizes.
inline chevron, no rails).
================================================================= */
 
Line 1,484 ⟶ 1,362:
table.wikitable caption { background-color: transparent; }
table.wikitable > tbody > tr:hover > td { background-color: #f2ede5; }
/* the frozen first column carries its own paper bg (below) at higher
specificity, so it needs its OWN hover rule to warm with the row */
table.wikitable.fintable > tbody > tr:hover > td:first-child,
table.wikitable:has(.col, .col-wide) > tbody > tr:hover > td:first-child {
background-color: #f2ede5;
}
 
table.wikitable.fintable td:first-child,
Line 1,504 ⟶ 1,388:
table.wikitable:has(.col, .col-wide) { border-left: none; }
 
/* caption = the table's TITLE:outer onemargins sizelive step aboveon the 13pxscroll WRAPPER (the cells,emitter withwraps
every table in <div style="overflow-x:auto">): top margin gives air
a systematic data glyph (swap the emoji here to change it everywhere) */
before the eyebrow caption + separates consecutive tables; the scrollbar
goes thin and quiet in the header-row tint */
.mw-parser-output div[style*="overflow-x"],
.copy-table-scroll {
margin: 1.8em 0 2em;
scrollbar-width: thin;
scrollbar-color: var(--wt-th-bg) transparent;
}
 
/* caption = the table's TITLE as a quiet EYEBROW (the shared kicker
treatment — breadcrumb / infobox header): uppercase sans, letter-spaced,
secondary ink, with air below before the grid. No glyph. */
table.wikitable caption {
colorfont-family: var(--ed-inksans);
font-size: 0.875rem75rem;
font-weight: 600;
letter-spacing: 0.08em;
}
text-transform: uppercase;
table.wikitable caption::before {
color: var(--ed-secondary);
content: "📊";
margintext-rightalign: 0.45emleft;
fontpadding-sizebottom: 0.9em7em;
}
 
Line 1,637 ⟶ 1,533:
color: var(--ed-ink) !important;
}
/* the inner spans are pinned #202122 !important by sectionold 7skin CSS — make them
them follow their heading's ink instead */
.mw-headline, .mw-page-title-main { color: inherit !important; }
 
Line 1,665 ⟶ 1,561:
color: var(--ed-secondary) !important;
text-decoration: none;
opacity: 0.7;
}
 
Line 1,682 ⟶ 1,579:
:focus-visible { outline-color: var(--ed-link); }
 
/* ── TOC sidebar: quiet sansconsolidated atfinal the ONE small size; "CONTENTS" label atdesign.
Geometry: every list item reserves a number GUTTER via padding;
the title's text level, its 1px ink rule on the title rule's line.
MediaWiki's own section numbers (Vector ships them display:none)
padding-top moves the LABEL and the rule together; padding-bottom
are re-shown ABSOLUTELY into the gutter, right-aligned so the
moves the RULE only — fine-tune in 0.05rem steps. ── */
dots form one column ("9." pads left, "10." fills the box); the
.vector-toc { font-family: var(--ed-sans); }
::after adds the dot. Entry text — first line AND wrapped lines —
starts at the padding edge by construction. "Beginning" (the one
entry MediaWiki leaves unnumbered) gets a generated "0." in the
same geometry. Nested lists sit FLUSH in the parent's padding box:
level-2 numbers start at the level-1 text axis (the numbers carry
the hierarchy — no rails). The expand/collapse control is the
house triangle ▸/▾ INLINE after the heading text. The CONTENTS
header is inset onto the single-digit axis via MARGIN (a border
travels with margins, not paddings).
CALIBRATION knobs: --toc-numb-gutter (text column start; the box
gutter−0.35rem must fit "22." or the dot wraps), level-2's wider
token, --toc-header-inset, and the 0.22rem row rhythm. ── */
.vector-toc {
font-family: var(--ed-sans);
--toc-numb-gutter: 1.6rem;
--toc-header-inset: 0.6rem;
}
.vector-toc .vector-toc-list-item.vector-toc-level-2 { --toc-numb-gutter: 2.8rem; }
/* ^ the level-2 box (gutter - 0.35rem gap) must fit "12.1." (~39px @13px
tabular) — at 2.2rem a two-digit parent's number overflowed its box and
butted against the text */
 
/* CONTENTS header: label + 1px ink rule on the title rule's line
(padding-top moves the label and rule together; padding-bottom the
rule only), inset onto the number axis */
.vector-toc .vector-pinnable-header {
border-bottom: 1px solid var(--ed-ink) !important;
padding-top: 0.35rem; /* CALIBRATION: moves the LABEL and the rule together */
padding-bottom: 0.95rem; /* CALIBRATION: moves the RULE only */
margin-bottom: 0.9rem;
padding-left: 0 !important;
margin-left: var(--toc-header-inset) !important;
}
.vector-toc .vector-pinnable-header-label {
Line 1,699 ⟶ 1,623:
text-transform: uppercase;
color: var(--ed-secondary) !important;
margin-left: 0;
}
 
/* entries: quiet sans at the ONE small size; ink on hover/active */
.vector-toc .vector-toc-link,
.vector-toc .vector-toc-link:visited {
Line 1,709 ⟶ 1,636:
.vector-toc .vector-toc-list-item-active > .vector-toc-link { color: var(--ed-ink) !important; }
 
/* ──lists TOCflush geometry:on ONEthe leftcomponent edge; rhythm + nestednumber railsgutter +on the inlineli chevron.*/
Vector indents every list item to reserve a LEFT gutter for the
toggle chevron, breaking the contents column's left line. Instead:
the AXIS is the component's own left edge — list items AND the
CONTENTS header are both pinned to it (alignment by construction,
no Vector padding values to chase). Each nested list carries a
hairline rail sitting exactly ON its parent's text axis (the
nested ul's left edge IS the parent text x once the li padding is
zeroed) — the same geometry as the prose list markers, stepped by
the same --ed-list-indent token. The rail of the subtree being
read tints to ink (active trail). The expand/collapse control is
the house triangle ▸/▾ INLINE after the heading text — it travels
with the label (nothing floats at the article-side edge) and
scales with the text. ── */
.vector-toc .vector-pinnable-header {
padding-left: 0 !important; /* CONTENTS on the same edge as the entries */
margin-left: 0 !important;
}
.vector-toc .vector-pinnable-header-label { margin-left: 0; }
.vector-toc .vector-toc-contents,
.vector-toc .vector-toc-list {
Line 1,735 ⟶ 1,644:
}
.vector-toc .vector-toc-list-item {
position: relative; /* the number's anchor */
padding-left: 0.22rem !important;0 0.22rem /* kill Vector's left chevron var(--toc-numb-gutter) */!important;
paddingfont-topsize: 0.22remvar(--ed-small); /* CALIBRATION:li, rowlink rhythmtext (moved offand the */abspos number must
share ONE font size: the number's static
padding-bottom: 0.22rem; /* now-inline .vector-toc-text padding) */
position is computed from the LI's line
metrics — a larger li strut seats the
number ~1px above the 13px text */
}
.vector-toc { .vector-toc-list-item > .vector-toc-raillist { margin-insettop: 0.25rem1rem; } /* CALIBRATION: rail bisects the
 
parent's first letter (≈ half a
/* the numbers */
capital at the TOC text size) */
.vector-toc .vector-toc-list-item > .vector-toc-listnumb {
display: block; /* defeat Vector's display:none */
margin-left: var(--toc-rail-inset);
position: absolute;
border-left: 1px solid var(--ed-hairline);
left: 0;
padding-left: calc(var(--ed-list-indent) - var(--toc-rail-inset) - 1px);
width: calc(var(--toc-numb-gutter) - 0.35rem); /* 0.35rem = number→text gap */
margin-top: 0.1rem;
text-align: right;
white-space: nowrap; /* the dot must never wrap inside the box */
font-variant-numeric: tabular-nums;
}
.vector-toc .vector-toc-listnumb:has(.vector-toc-list-item-active):after { content: "."; }
 
border-left-color: var(--ed-ink); /* active trail */
/* "0." for Beginning — styled like a number INSIDE the link (the li is
body-size and bolds when active; pin size/weight, re-bold on active) */
.vector-toc #toc-mw-content-text::before {
content: "0.";
position: absolute;
left: 0;
width: calc(var(--toc-numb-gutter) - 0.35rem);
text-align: right;
white-space: nowrap;
font-variant-numeric: tabular-nums;
color: var(--ed-secondary);
font-size: var(--ed-small);
font-weight: 400;
}
.vector-toc #toc-mw-content-text.vector-toc-list-item-active::before {
color: var(--ed-ink);
font-weight: 700;
}
 
/* chevron: the entry text goes inline so the sibling toggle button
flows right after the label ("Outlook 3 ▾"). The Codex icon is
Line 1,834 ⟶ 1,767:
.printfooter { display: none; } /* "Retrieved from ..." clutter; stays in print */
}
#footer, .mw-footer, .minerva-footer {
font-family: var(--ed-sans);
color: var(--ed-faint);
Line 1,896 ⟶ 1,829:
.ext-aiassistant-cite a { color: var(--ed-link) !important; }
 
/* ── Collapsible inline footnotes ({{footnote}} → <detailsspan class="ed-fn">).
MW 1.43's sanitizer REJECTS <details>/<summary> in wikitext
Readers see a small dotted-underline "note" chip; the chip text is
CSS(verified content,live: NOTtags inrender theas DOMliteral text.), Clickingso expandsthis theis notespans inline+
the Common.js toggle (adds/removes .ed-fn-open on chip click).
in the secondary voice, wrapped in CSS-generated parens. The
Readers see a small dotted-underline "note" chip; clicking opens
literal "(footnote: " / ")" wrappers stay in the DOM inside
the note as a POPOVER card that floats ABOVE the text (no reflow —
always-hidden spans, so the bot's HTML retrieval reads exactly the
the paragraph never shifts). The chip label is CSS content and the
pre-template format — readers and RAG see different things from
literal "(footnote: " / ")" wrappers live in always-hidden spans,
the same markup. ── */
so the bot's HTML retrieval reads the full note regardless of CSS
.ed-fn { display: inline; }
(Docling parses the DOM, not the rendered layout) — readers and
.ed-fn::details-content { display: inline; }
RAG see different things from one markup.
.ed-fn > summary.ed-fn-chip {
Common.js adds .ed-fn-flip near the right edge (card opens leftward)
display: inline;
and keeps only one card open at a time. ── */
list-style: none; /* no disclosure triangle */
.ed-fn { position: relative; } /* the popover's anchor */
cursor: pointer;
.ed-fn-chip { cursor: pointer; white-space: nowrap; }
}
.ed-fn > summary.ed-fn-chip::-webkit-details-markerafter { display: none; }
.ed-fn > summary.ed-fn-chip::after {
content: "note";
font-family: var(--ed-sans);
Line 1,921 ⟶ 1,853:
text-underline-offset: 2px;
}
.ed-fn[open] > summary.ed-fn-chip:hover::after { color: var(--ed-link); },
.ed-fn.ed-pre,fn-open > .ed-fn-closechip::after { displaycolor: nonevar(--ed-link); } /* DOM text for the bot only */
 
.ed-fn-body { color: var(--ed-secondary); }
/* always in the DOM for the bot; never shown to readers as inline text */
.ed-fn[open] > .ed-fn-body::before { content: " ("; }
.ed-fn[open] >-pre, .ed-fn-body::after close { contentdisplay: ")"none; }
.ed-fn-body { display: none; }
 
/* the popover card */
.ed-fn.ed-fn-open > .ed-fn-body {
display: block;
position: absolute;
top: 1.6em; /* just below the chip's line */
left: 0;
z-index: 30;
width: max-content;
max-width: min(24rem, 90vw); /* never overflow the viewport */
padding: 0.7em 0.9em;
background: #fff;
border: 1px solid var(--ed-hairline-strong);
border-left: 3px solid var(--ed-accent); /* house coral spine */
border-radius: 2px;
box-shadow: 0 6px 22px rgba(43, 41, 38, 0.14);
font-family: var(--ed-serif);
font-size: 0.9rem;
font-weight: 400;
font-style: normal;
line-height: 1.5;
letter-spacing: 0;
text-align: left;
text-transform: none;
white-space: normal;
color: var(--ed-ink);
}
/* a card needs no inline parens */
.ed-fn.ed-fn-open > .ed-fn-body::before,
.ed-fn.ed-fn-open > .ed-fn-body::after { content: none; }
/* near the right edge, open the card leftward (JS sets .ed-fn-flip) */
.ed-fn.ed-fn-open.ed-fn-flip > .ed-fn-body { left: auto; right: 0; }
 
/* no-JS safety net: if site JS ever fails to load, notes stay readable */
.client-nojs .ed-fn-body { display: inline; color: var(--ed-secondary); }
.client-nojs .ed-fn-chip { display: none; }
 
/* ── Mobile ── */
Line 1,933 ⟶ 1,902:
h1#firstHeading, .mw-first-heading { font-size: 1.7rem; }
.mw-body-content h2, .mw-body-content .mw-heading2 { font-size: 1.22rem; }
/* footnote card → fixed bottom sheet so it can never clip off-screen */
.ed-fn.ed-fn-open > .ed-fn-body {
position: fixed;
left: 1rem; right: 1rem; bottom: 1rem;
top: auto; width: auto; max-width: none;
box-shadow: 0 -4px 22px rgba(43, 41, 38, 0.18);
}
.ext-aiassistant-prompt-composer { border-bottom: 1px solid var(--ed-hairline) !important; }
}