Last Updated: February 25, 2016
·
669
· viczam

sass nesting

do not nest you selectors more than 3 or 4 levels deep

3 Responses
Add your response

Why? I've heard this a few times. Does it decrease compiling time or just make the code hard to manage?

over 1 year ago ·

Personally, it just makes certain things harder to override at times. Since nesting is so easy, it gets out of hand quickly. I've been trying a lot harder to make my css smacss, so it's already cut down on nesting.

over 1 year ago ·

@corysimmons, hard to manage. It’s just a common sense rule to keep the specificity of your selectors to a minimum.

over 1 year ago ·