Skip to content

re: 7 CSS properties you had no idea about VIEW POST

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

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.

code of conduct - report abuse