Hacker News new | ask | show | jobs
by mminer237 1043 days ago
`* + *` works, but I think `:not(:first-child)` is a much clearer way of doing this. (Unless you need to support IE8 for some horrific reason?)
1 comments

I assume the author is alluding to a certain blog post. https://alistapart.com/article/axiomatic-css-and-lobotomized...

To the point, the :not(:first-child) option should similarly be able to minimize the total number of rules.

`:not(:first-child)` has specificity 0.1.0 that is some orders higher than 0.0.0 of `* + *` (since `:first-child` is a pseudoclass), so you'd have to adjust anything that you'd need to override it with.

Strict equivalent of

    * + *
would be

   :where(:not(:first-child))