4 ms·
`* + *` 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?)
by mminer237 3y 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?)
- lcnPylGDnU4H9OF 3y agoI assume the author is alluding to a certain blog post. https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/ 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.
- myfonj 3y ago`: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))