Oddbean new post about | logout
 @957492b3 almost

It’s two rules:

a {}
a b {}

Take a look at the spec. It has some examples that might help.

https://drafts.csswg.org/css-nesting/#example-82c7d228 
 @0ffd42b0 But that's kind of my entire point, if something as basic as simple nesting requires "reading the spec" to get it right, something is wrong. 

CSS is overly agressive with brevity hacks which causes readability problems and bugs. It's optimizing for writers not readers.

Too many times I've stared at CSS thinking I was looking at a REGEX-style expression, it was far too baroque.

Easy to fix in this case, just use the & all the time. Will likely prevent a few bugs in the process