Commit 3e59512
committed
Increase top margin for long list items
List items inside `#content` use `var(--space-sm)` as their top margin
because `var(--space)` looks too disjointed for single-paragraph items,
especially single-line items. However, when a list item contains an
element that itself has a `var(--space)` top margin, the list item's top
margin looks mismatched.
This commit adds a style tweak such that all list items in a list with
any multi-paragraph items will use `var(--space)` for their top margin.
(More specifically, when any item contains a paragraph plus another
block level element, such as another paragraph or a code block.)
Unfortunately, this enhancement does not currently work in Firefox
because it relies on the `:has()` selector. However, it is only a minor
enhancement, and Firefox plans to support `:has()` in the near future.1 parent 3f0fee5 commit 3e59512
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
385 | 390 | | |
386 | 391 | | |
387 | 392 | | |
| |||
0 commit comments