MediaWiki:Common.css: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1,709:
.vector-toc .vector-toc-list-item-active > .vector-toc-link { color: var(--ed-ink) !important; }
 
/* ── TOC section numbers: MediaWiki+ computeshanging themindent for(consolidated, every entryorder-proof).
MediaWiki computes the numbers (1, 2, 2.1 …); Vector ships them display:none. Re-shown so the
display:none. Re-shown in a FIXED gutter with a hanging indent:
column reads as an ordered document — the wiki OWNS numbering
numbers sit on the left axis, all entry text shares one axis
(generated headings carry no literal prefixes; the spreadsheet
whether the number is 1 or 2 digits, wrapped lines align under
pipeline strips sheet-tab "1." prefixes to avoid doubling).
the TEXT. The gutter token is REM, not em — the li (body size)
Tabular figures so multi-digit numbers keep one rhythm. ── */
and the number span (--ed-small) must measure the SAME width.
The li selector carries +1 specificity so it beats the geometry
block's `padding-left: 0 !important` regardless of paste order.
The numb span resets text-indent: an inline-block inherits the
li's negative indent and would clip its own digits. ── */
.vector-toc .vector{ --toc-numb-gutter: {1.5rem; }
.vector-toc .vector-toc-contents .vector-toc-list-item {,
.vector-toc .vector-toc-list-item {
padding-left: var(--toc-numb-gutter) !important;
text-indent: calc(-1 * var(--toc-numb-gutter));
.vector-toc .vector-toc-numb {
display: inline-block;
min-width: var(--toc-numb-gutter);
margin-right: 0.4em;
text-indent: -1.5em0; /* underdo theNOT text,inherit notthe underli's thenegative numberindent */
font-variant-numeric: tabular-nums;
}
.vector-toc .vector-toc-numb::after { content: "."; } /* "1." not "1" */
 
.vector-toc .vector-toc-numb {
display: inline-block; /* fixed number gutter: text axis is uniform */
min-width: 1.5em;
margin-right: 0;
.vector-toc .vector-toc-list-item {
padding-left: 1.5em !important; /* hanging indent: wrapped lines align */
text-indent: -1.5em; /* under the text, not under the number */
}
 
/* ── TOC geometry: ONE left edge + nested rails + inline chevron.