Hacker News new | ask | show | jobs
by pothibo 3459 days ago
Element level selectors are so often demonized and having written quite a bit of CSS in my life, I have come to appreciate how easy it is to write and maintain CSS when you actually use those element level selectors mixed with relationship selectors ( >, +, ~,) and attribute selectors.
1 comments

I don't demonize them, I use them too. But if you rely on them too much then eventually it causes problems. Especially on a large project that grows over time in CSS and HTML.

Attribute selectors are indeed handy and are on par with class names in my suggestion.