-
Notifications
You must be signed in to change notification settings - Fork 746
Closed
Labels
Description
Not sure if this is the place to bring this up, but: In the CSS Nesting spec example 5, there is an example showing a nested &&
, describing it as "Again, silly, but can even be doubled up." The unnested equivalent of that example is:
.foo { color: blue; }
.foo.foo { padding: 2ch; }
It seems less silly when considering that the .foo.foo
has double the specificity (0-2-0) of the .foo
selector (0-1-0). That is a somewhat common technique of increasing specificity without changing anything of the "query" of the selector. Being able to chain the &
in a nested selector makes it less verbose and easier to manage this technique, and it might be worth noting this to make it more apparent, or at least dropping the "silly" bit.