-
Notifications
You must be signed in to change notification settings - Fork 33
CSS style container queries (custom properties) #433
Description
Description
Style container queries (not to be confused with size container queries) allow for any styles to be queried from a parent container. This issue is specifically about querying custom properties rather than standard properties.
Example:
:root {
--theme: dark;
}
body {
@container style(--theme: dark) {
color: white;
background: black;
}
}Specification
https://drafts.csswg.org/css-contain-3/#style-container
Open Issues
No response
Tests
Current Implementations
- Blink
- Gecko
- WebKit
Standards Positions
Gecko: mozilla/standards-positions#686
Webkit: WebKit/standards-positions#57
Blink: https://groups.google.com/a/chromium.org/g/blink-dev/c/ACL23q_nbK0/m/PaNJ81_qDAAJ
Browser bug reports
Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1795622
Webkit: https://bugs.webkit.org/show_bug.cgi?id=246605
Blink: https://bugs.chromium.org/p/chromium/issues/detail?id=1302630
Developer discussions
These articles demonstrate some good use cases:
Polls & Surveys
No response
Existing Usage
No response
Workarounds
No response
Accessibility Impact
No response
Privacy Impact
No response
Other
There is some useful discussion here about separating custom property queries from standard property queries: w3c/csswg-drafts#7185
Metadata
Metadata
Assignees
Labels
Type
Projects
Status