MediaWiki:Common.css: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1,827:
}
 
/* ── TOC sidebar — flat left-aligned design, NO section numbers.
Every entry, ANY level, starts on ONE left axis:. theDepth sectionis carried by
an inline en-dash marker generated per Vector level class: top level
number is INLINE (Vector ships it display:none; we re-show it)
bare, children "–", grandchildren "––" — flowing straight into the
flowing straight into the title as a single text run, so "2.1.
Press release" readstitle as one stringtext run. DepthNO indentation, isNO carriedgutter, byNO theabsolute
positioning. Titles wrap under themselves (the marker is its own
number itself plus a lighter ink on child rows — NO indentation,
flex item, so wrapped lines align after it). Expand/collapse is the
NO number gutter, NO absolute positioning (the old gutter geometry
house triangle ▸/▾ INLINE after the heading. The CONTENTS header left-aligns with
is gone). The ONE structural rule is a hanging indent on every li
(left--toc-hang):aligns with the first line outdents to thesame axis,. wrapped── lines*/
align under the TITLE. Nested <ul>s are pulled back by the same
--toc-hang so level-2+ numbers land on the level-1 axis (flat, no
staircase). "Beginning" (the one entry MediaWiki leaves unnumbered)
gets a generated inline "0.". Expand/collapse is the house triangle
▸/▾ INLINE after the heading. The CONTENTS header left-aligns with
the number axis.
CALIBRATION: --toc-hang is the wrap-indent / number budget — size
it to the title-start of the entries that actually wrap (level-2,
~"2.2. "); the 0.22rem row rhythm is unchanged. ── */
.vector-toc {
font-family: var(--ed-font);
--toc-header-inset: 0; /* CONTENTS label sits on the numberentry axis */
}
 
Line 1,923 ⟶ 1,914:
}
 
/* HANG-UNDER-TITLE: the numberdepth marker and the title share a flex row, so the title is
a wrapping block whose 2nd+ lines align under the TITLE (after the number).
Because the numbermarker is its own flex item, this holds for any numbermarker width
("3."one vsdash "12."or two), which a fixed text-indent could not. The link is a flex item
of the row; grow:0 so a short title doesn't stretch (the chevron stays right
after it), shrink:1 + min-width:0 so a long title wraps. */
Line 1,941 ⟶ 1,932:
Zeroed so the li's 2×--wt-pad-y is the ONE rhythm. */
}
.vector-toc/* NO section numbers — Vector ships .vector-toc-numb {display:none and we no
longer re-show it. Depth is carried by DASH markers instead: an en dash
flex: 0 0 auto; /* the number column = its own width */
per nesting level ("–" children, "––" grandchildren), generated as the
display: inline; /* defeat Vector's display:none */
first flex item of the text row (the slot the number used to occupy) off
Vector's per-level li classes. Top-level entries carry no marker. */
.vector-toc #.vector-toc-mwlevel-content-text2 > .vector-toc-list-item-activelink .vector-toc-text::before { content: "\2013"; }
.vector-toc #.vector-toc-mwlevel-content3 > .vector-texttoc-link .vector-toc-text::before { content: "\2013\2013"; }
.vector-toc .vector-toc-numblevel-4 > .vector-toc-link .vector-toc-text::afterbefore { content: ".\2013\2013\2013"; }
.vector-toc .vector-toc-level-2 > .vector-toc-link .vector-toc-text::before,
.vector-toc .vector-toc-level-3 > .vector-toc-link .vector-toc-text::before,
.vector-toc .vector-toc-level-4 > .vector-toc-link .vector-toc-text::before {
flex: 0 0 auto;
margin-right: 0.4em;
white-space: nowrap;
letter-spacing: -0.08em; /* consecutive en dashes read as one rule */
font-variant-numeric: tabular-nums;
}
.vector-toc .vector-toc-numb::after { content: "."; }
/* the title span is unclassed in Vector's DOM; it is the wrapping block */
.vector-toc .vector-toc-text > span:not(.vector-toc-numb) {
flex: 1 1 auto;
min-width: 0; /* allow the title to wrap inside the row */
}
 
/* "0." for Beginning — it has no numb span, so generate it as the FIRST flex
item of its text row; same number voice, ink + medium when active */
.vector-toc #toc-mw-content-text .vector-toc-text::before {
content: "0.";
flex: 0 0 auto;
margin-right: 0.4em;
white-space: nowrap;
font-variant-numeric: tabular-nums;
color: var(--text-dark);
}
.vector-toc #toc-mw-content-text.vector-toc-list-item-active .vector-toc-text::before {
font-weight: 500;
}