Designer News
Where the design community meets.
almost 6 years ago from Philip Davis, Designer and Developer
Hi Evan, i don't avoid nesting entirely, but the danger is that you have a lot of specificity variance which makes it difficult to quickly understand how styles are being applied and overridden. This is documented in Harry Robert's CSS Guidelines: https://cssguidelin.es/#specificity
Following what Philip said, this post from Slack's engineering team has a great visualization of specificity, and a description of why the team refactored the way it did.
Thanks for the clarification Clarke and Philip!
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
Great write up! Anyone have any input as to why nesting is to be avoided? I use it quite a lot in my own projects.