TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Friendly Introduction to Container Queries

3 pointsby bkyan7 months ago

1 comment

bkyan7 months 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.
评论 #42099768 未加载