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
(1, 2, 2.1 …); Vector ships them display:none. The li reserves a
gutter (left:0, top:auto keeps it on its own first line). Entry
by construction, so alignment cannot drift; no inline-block, no
negative text-indent, no whitespace-node gaps. Gutter token in
REM; level-2 widens its own token ("2.1." is wider than "9.").
The li selector carries +1 specificity so it beats the geometry
block's `padding-left: 0 !important` regardless of paste order. ── */
.vector-toc .vector-toc-list-item.vector-toc-level-2 { --toc-numb-gutter: 2rem; }
▲.vector-toc { --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:
}
.vector-toc .vector-toc-numb {
position: absolute; /* anchored to the li (position:relative) */
left: 0;
font-variant-numeric: tabular-nums;
}
| |||