Live data from Hacker News

A Friendly Introduction to Container Queries

joshwcomeau.com

1–3 of 3 posts

Re: A Friendly Introduction to Container Queries

#2
The thing I still find weird about Container Queries is that there doesn't appear to be a way to distinguish between different containers based on class, as @container applies to any parent container. So, a

inside of a card with class .card-with-blue-background would get the same styles as a

inside of a card with class .card-with-red-background, since there isn't an easy way (as far as I could tell) to distinguish between the two scenarios within the Container Query, itself.

Re: A Friendly Introduction to Container Queries

#3
post #2

The thing I still find weird about Container Queries is that there doesn't appear to be a way to distinguish between different containers based on class, as @container applies to any parent container. So, a inside of a card with class .card-with-blue-background would get the same styles as a inside of a card with class .card-with-red-background, since there isn't an easy way (as far as I could tell) to distinguish be…

Oh, just figured out that there is a field for this → container-name