DEV Community

Discussion on: 7 CSS properties I had no idea about

Collapse
 
tlakomy profile image
Tomasz Łakomy

A while ago I’ve learned about list-style, is this what you’re looking for? 🌟

css-tricks.com/almanac/properties/...

Collapse
 
joelbardsley profile image
Joel Bardsley

The color of the list marker will be whatever the computed color of the element is (set via the color property)

So there's no intuitive "list-style-color" property that would allow a different colored bullet to the font color, the common workaround has been to use spans inside list items and styling the spans with a different color value.

Mozilla have recently introduced a ::marker pseudo-element to allow this more easily, but support outside of Firefox isn't there yet. One to keep an eye on.