Lists clear floated figures: flow-root on custom-marker lists so markers no longer overlap a left float

This commit is contained in:
2026-08-28 23:30:44 +00:00
parent 72e722c094
commit 1d64d1e653
+6 -1
View File
@@ -646,11 +646,16 @@ article * + h6 {
theme swaps in. The box is em-sized so it tracks the local text size
(e.g. smaller in asides); a theme that shrinks the glyph via
font-size must widen the box by the inverse factor (see the purple
theme) to keep it spanning the indent. */
theme) to keep it spanning the indent. flow-root makes the list a
block formatting context: beside a floated figure the whole list box
clears the float (line boxes alone would dodge it while the marker
box, outdented from the li's padding edge, stayed under the image),
so the gap becomes the figure's margin plus the full --list-indent. */
article :is(ul, ol:not([type])) {
list-style: none;
padding-left: 0;
--list-indent: 2em;
display: flow-root;
}
article :is(ul, ol:not([type])) > li {