Settings

Theme

A Friendly Introduction to Container Queries

joshwcomeau.com

3 points by bkyan a year ago · 2 comments

Reader

bkyanOP a year ago

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 <p> inside of a card with class .card-with-blue-background would get the same styles as a <p> 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.

  • bkyanOP a year ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection