Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

what will nesting do to the cascade rules - I suppose that

.foo { & .bar { color: blue; } }

will have the same precedence rules as

.foo .bar { color: blue; }

in which case it is probably best to avoid the usage in most cases.

Given CSS variables, container queries and various other developments nesting seems like a bad way to organize your CSS.

on edit: to clarify my experience with sass is that people nest overly much, creating very complicated precedence situation that then later they can't figure out why their bar class is blue.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: