DEV Community

Discussion on: 7 CSS properties I had no idea about

Collapse
 
amykble profile image
Amy

It's crazy to me that CSS has these built in properties like the caret property, yet its not possible to change the style of an ul bullet point🤔 CSS is weird!

Great article!

Collapse
 
rafibomb profile image
Rafi

You can apply bullet styles or images even: w3schools.com/cssref/pr_list-style...

Collapse
 
akainth015 profile image
Aanand Kainth

I believe it does, list-style-type does the trick if I remember correctly.

Collapse
 
amykble profile image
Amy • Edited

Hey all, thanks for the tips! I actually already use pseudo elements in my CSS to style my lists!

I was instead just commenting about the qwerks of CSS, it's an interesting language to say the least.

Collapse
 
tlakomy profile image
Tomasz Łakomy • Edited

CSS is ... interesting

It tries to be a lot of things and is not particularly good at most of them

Collapse
 
cbloss profile image
cbloss

This made me laugh a little too hard because it's so true. Thanks for that!

Collapse
 
calebpitan profile image
Caleb Adepitan

You can still customize it using list images

Collapse
 
antwon profile image
antwon

Don't forget about CSS Counters!

developer.mozilla.org/en-US/docs/W...

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.