CSS Weekly @cssweekly.com · Aug 12

[Quiz] Is this valid CSS? 🤔 To be clear, this is the entire context, & is not nested within another selector. (I'll share the explanation tomorrow.)

17 likes 3 replies

?

Replies

CSS Weekly · Aug 14

[Answer] Yes, this is a valid selector. It’s part of CSS nesting, and ‘&’ when not nested is equal to :scope, or in this case, it applies to document.

CSS by T. Afif · Aug 12

I was going to explain until I saw that last line 😅

This One Ate Seven · Aug 12

IIRC, it is. Can’t remember the whole story behind it though