rendered_markdown: Correct presentation of nested lists.

To properly increment counters, and display lists of the
correct type when nested, we need to use child selectors
and not the previous, overly generic descendant selectors.
This commit is contained in:
Karl Stolley
2025-06-11 15:12:33 -05:00
committed by Tim Abbott
parent 4e43c2f32d
commit 74b0d8ff61

View File

@@ -39,14 +39,14 @@
}
}
li {
& > li {
/* This aligns bullets to roughly the
center of a single-digit counter.
11.2px at 16px/1em */
padding-inline-start: 0.7em;
}
& li::marker {
& > li::marker {
/* This is an eyeballed value, but it makes the
otherwise diminutive markers specified above
both larger *and* better vertically centered. */
@@ -71,13 +71,13 @@
same here to offset the counters. */
padding-inline-start: 2.1ch;
& li {
& > li {
counter-increment: count 1;
/* 3.2px at 16px/1em */
padding-inline-start: 0.2em;
}
& li::marker {
& > li::marker {
content: counter(count, decimal) ". ";
}
}