Menu

#SpecifiCity

8 posts

Feed·
8 of 8 posts
Cascade Layers (@layer) in CSS: how to solve the specificity problem once and for all
🖼️
0Read More

Cascade Layers (@layer) in CSS: how to solve the specificity problem once and for all

DEV Community·Nick Benksim·6 months ago
#y2OoNJin
#css#webdev#frontend#layer#specificity

From Dev.to - webdev: Cascade Layers (@layer) in CSS: how to solve the specificity problem once and for all

15s
Why I spent years trying to make CSS states predictable
🖼️
0Read More

Why I spent years trying to make CSS states predictable

DEV Community·Andrey Yamanov·6 months ago
#q2PmuEiO
#primary#css#webdev#surface#frontend

Have you ever changed the order of two CSS rules and broken a component without changing the logic? .btn:hover { background: dodgerblue; } .btn[disabled] { background: gray; } Both selectors have specificity (0, 1, 1).…

15s
0Read More

Alternatives to the !important Keyword

CSS-Tricks·Saleh Mubashar·6 months ago
#4ZBcJS0Z
#css-tricks#header#sidebar#some_id#code

Cascade layers, specificity tricks, smarter ordering, and even some clever selector hacks can often replace !important with something cleaner, more predictable, and far less embarrassing to explain to your future self.…

15s