DEV Community

Discussion on: The cost of CSS selectors

Collapse
 
clovis1122 profile image
José Clovis Ramírez de la Rosa • Edited

Good article, regarding "More specific" being part of the "Pros" - can you explain why? It kinda looks like "Const" for me - the more generic, the easier to maintain.

Collapse
 
nugetchar profile image
Thomas Toledo-Pierre

That's an excellent point.
Actually, I was speaking in term of human reading. It is more of a subjective pros than an objective one, but I do find it easier to read and then to know where exactly the style is applied.

On the other hand, I am trying not to do stick to much with that, because, as you said: the more generic, the easier to maintain (although too much genericity might lead to poorer performances if not used properly).