TIL you can do #myId#myId#myId span { ... } and it makes a difference over #myId span { ... }

https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#increasing_specificity_by_duplicating_selector

Adding the same id multiple times increases the specificity of a selector and thus overrides other selectors.

e.g.

#myId span {color: red; }
#myId#myId#myId span { color: blue; }

Codepen

2 points · 0 comments · view on lemmy.world

0 Comments

No comments yet.