DEV Community

Discussion on: Improve your CSS with these 5 principles

 
adrianbdesigns profile image
Adrian Bece

Thank you for the very detailed and insightful answer. I guessed as much regarding the performance and the worst-case scenario. In any case, I think that having a single selector is the best way to go in terms of performance, code readability and flexibility.

In any case, having several levels of CSS selectors brings up some other issues, as described in "Open/Closed principle".