::marker is a real, independently styled box now - its color/font are its own, not the list item's.
red marker, black text ::marker { color: red; } |
large bold marker ::marker { font-size: 13pt; font-weight: bold; } |
marker color vs. text color ::marker { color: green; } |
both color and font-size ::marker { color: #8e44ad; font-size: 13pt; } |
An explicit content value fully replaces the automatic bullet/number - no automatic "." suffix, so any spacing/punctuation must be in the string itself.
custom string ::marker { content: "→ "; } |
counter() override ::marker { content: counter(list-item) ") "; } |
content: none (suppressed) ::marker { content: none; } |
content: normal (baseline) ::marker { content: normal; } |
The marker's own direction is independent of the list item's own text direction.
marker: rtl, text: ltr ::marker { direction: rtl; } |
marker: ltr (baseline) ::marker { direction: ltr; } |
An "inside" marker is a real first inline child of the list item's own content, flowing (and wrapping) like ordinary text; an "outside" marker (the default) hangs to the left, never affecting the item's own line-wrap.
outside (default) list-style-position: outside |
inside list-style-position: inside |
inside + large marker font-size list-style-position: inside; ::marker { font-size: 20pt } |