TIL about the bullet ::marker
POSTED ON:
TAGS: css
When you have a list element, you had to hack the css to change bullet items.
DEFAULT:
- Item 1
- Item 2
- Item 3
You did that by hiding the bullet, then using a ::before
class with content to replace the bullet with something else.
Now, there's a CSS psuedo element called ::marker, which makes it a lot easier to modify bullets!
ol li::marker {
content: "🧡 ";
}
REF:
https://web.dev/css-marker-pseudo-element/
https://css-tricks.com/almanac/selectors/m/marker/
Related TILs
Tagged: css