#787: Design and specification review of CSS Container Queries Style Features
Discussions
2022-12-19
Lea: can we close this? There were no objections in the design review async chat we had.
Rossen: I like the explainer.
Lea: not a new feature - it's extending container queries which we have reviewed before. No signals form gecko or webkit... No response to the standards positions requests...
Rossen: from TAG's PoV I feel this is definitely the right way to go about this feature.
Peter: I agree I don't think there are any architectural issues...
Dan: Lea can you write a closing comment?
Lea: Can write that the comment I wrote reflects our consensus.
consensus: yes
OpenedNov 21, 2022
Wotcher TAG!
I'm requesting a TAG review of Style Features for Container Queries.
TAG guidelines state that custom attributes should not be used for styling, and authors should rely on CSS custom properties instead. However, custom properties are currently limited to carrying a single value, making it hard to achieve any more complex impact beyond simple value substitution. Meanwhile, container queries allow authors to write conditional CSS based on an ancestor 'container' element. Browsers are already broadly shipping 'dimensional' container queries. By adding the ability to query 'style features' as well, we can use the container query syntax to help solve this long-standing issue for authors.
Further details:
You should also know that...
There is already a partial (custom properties only) prototype implementation in Chromium v107+ behind the 'experimental web platform features' flag.
We'd prefer the TAG provide feedback as (please delete all but the desired option):
🐛 open issues in our GitHub repo for each point of feedback
( also ok to 💬 leave review feedback as a comment in this issue and @-notify mirisuzanne if that's simpler)