fix(theme): squircle list markers, keep CMS li text inline

This commit is contained in:
Ilia Mashkov
2026-07-14 10:35:23 +03:00
parent 44abc362bc
commit 1bd76d7061
+19 -7
View File
@@ -378,16 +378,28 @@
margin-top: 0; margin-top: 0;
} }
/* Some CMS output wraps li text in a block <p> (<li><p>…</p></li>), which drops
* the text below the marker. Keep it inline so marker and text share a line. */
.rich-text ul li > p {
display: inline;
margin: 0;
}
.rich-text ul li::before { .rich-text ul li::before {
content: ""; content: "";
display: inline-block; display: inline-block;
width: calc(1.5em / 0.55); /* 0.5em glyph + 1em gap = 1.5em advance, filling the hanging indent */
/* reset inherited text-indent so glyph isn't shifted inside the ::before box */ width: 0.5em;
height: 0.5em;
margin-right: 1em;
/* reset inherited text-indent so the box isn't shifted */
text-indent: 0; text-indent: 0;
color: var(--blue); background: var(--blue);
font-size: 0.55em; /* squircle: corner-shape is progressive enhancement, ignored where unsupported */
/* line-height matches parent so diamond centers within the first line box */ border-radius: 30%;
line-height: calc(var(--line-height-relaxed) / 0.55); /* biome-ignore lint/correctness/noUnknownProperty: corner-shape is valid CSS, newer than Biome's property list */
corner-shape: squircle;
vertical-align: middle;
} }
/* Cross-section view transition (navigation between sections) */ /* Cross-section view transition (navigation between sections) */