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 computes the numbers (1, 2, 2.1 …); Vector ships them
display:none. Re-shown in a FIXED gutter with a hanging indent:
numbers sit on the left axis, all entry text shares one axis
whether the number is 1 or 2 digits, wrapped lines align under
the TEXT. The gutter token is REM, not em — the li (body size)
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-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);
font-variant-numeric: tabular-nums;
}
.vector-toc .vector-toc-numb::after { content: "."; } /* "1." not "1" */
▲.vector-toc .vector-toc-numb {
▲}
▲.vector-toc .vector-toc-list-item {
▲ text-indent: -1.5em; /* under the text, not under the number */
/* ── TOC geometry: ONE left edge + nested rails + inline chevron.
| |||