-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Chrome 143 supports CSS Anchor Position Container Queries #28526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,6 +36,102 @@ | |||||
| "deprecated": false | ||||||
| } | ||||||
| }, | ||||||
| "anchor_position_queries": { | ||||||
| "__compat": { | ||||||
| "description": "Anchor position queries (`anchored()`)", | ||||||
| "spec_url": "https://drafts.csswg.org/css-anchor-position-2/#anchored-container-queries", | ||||||
| "support": { | ||||||
| "chrome": { | ||||||
| "version_added": "143" | ||||||
| }, | ||||||
| "chrome_android": "mirror", | ||||||
| "edge": "mirror", | ||||||
| "firefox": { | ||||||
| "version_added": false | ||||||
| }, | ||||||
| "firefox_android": "mirror", | ||||||
| "oculus": "mirror", | ||||||
| "opera": "mirror", | ||||||
| "opera_android": "mirror", | ||||||
| "safari": { | ||||||
| "version_added": false | ||||||
| }, | ||||||
| "safari_ios": "mirror", | ||||||
| "samsunginternet_android": "mirror", | ||||||
| "webview_android": "mirror", | ||||||
| "webview_ios": "mirror" | ||||||
| }, | ||||||
| "status": { | ||||||
| "experimental": true, | ||||||
| "standard_track": true, | ||||||
| "deprecated": false | ||||||
| } | ||||||
| }, | ||||||
| "fallback": { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we documenting this (behavioral?) subfeatures?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not a behavioral subfeature. It's a named container query "feature" (in media/container queries terminology, not the BCD sense), as in Right now there's only one feature to query against, but it's possible other container query features could exist (e.g.,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a suffix for clarity?
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also modeled this feature after a |
||||||
| "__compat": { | ||||||
| "description": "`fallback` container feature", | ||||||
ddbeck marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| "spec_url": "https://drafts.csswg.org/css-anchor-position-2/#descdef-container-fallback", | ||||||
| "support": { | ||||||
| "chrome": { | ||||||
| "version_added": "143" | ||||||
| }, | ||||||
| "chrome_android": "mirror", | ||||||
| "edge": "mirror", | ||||||
| "firefox": { | ||||||
| "version_added": false | ||||||
| }, | ||||||
| "firefox_android": "mirror", | ||||||
| "oculus": "mirror", | ||||||
| "opera": "mirror", | ||||||
| "opera_android": "mirror", | ||||||
| "safari": { | ||||||
| "version_added": false | ||||||
| }, | ||||||
| "safari_ios": "mirror", | ||||||
| "samsunginternet_android": "mirror", | ||||||
| "webview_android": "mirror", | ||||||
| "webview_ios": "mirror" | ||||||
| }, | ||||||
| "status": { | ||||||
| "experimental": true, | ||||||
| "standard_track": true, | ||||||
| "deprecated": false | ||||||
| } | ||||||
| }, | ||||||
| "any": { | ||||||
ddbeck marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| "__compat": { | ||||||
| "description": "`any` query value", | ||||||
| "spec_url": "https://drafts.csswg.org/css-anchor-position-2/#valdef-position-area-query-any", | ||||||
| "support": { | ||||||
| "chrome": { | ||||||
| "version_added": "143" | ||||||
| }, | ||||||
| "chrome_android": "mirror", | ||||||
| "edge": "mirror", | ||||||
| "firefox": { | ||||||
| "version_added": false | ||||||
| }, | ||||||
| "firefox_android": "mirror", | ||||||
| "oculus": "mirror", | ||||||
| "opera": "mirror", | ||||||
| "opera_android": "mirror", | ||||||
| "safari": { | ||||||
| "version_added": false | ||||||
| }, | ||||||
| "safari_ios": "mirror", | ||||||
| "samsunginternet_android": "mirror", | ||||||
| "webview_android": "mirror", | ||||||
| "webview_ios": "mirror" | ||||||
| }, | ||||||
| "status": { | ||||||
| "experimental": true, | ||||||
| "standard_track": true, | ||||||
| "deprecated": false | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
| }, | ||||||
| "scroll-state_queries": { | ||||||
| "__compat": { | ||||||
| "description": "Scroll-state queries", | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec change I agree with, but I'm reluctant to change the description and key name.
I modeled this feature after
scroll-state()(see this compat table), where we describe the feature as "Scroll-state queries" and then nest the features for that query type under it. If we do something different for anchor positioning, I think we ought to do the same for scroll-state.Also, I think "function" specifically is a risky term in this context. The spec text here is a bit loose (other specs use the phrase "functional notation" for at-rule syntax like this). I think it's mostly a convenience for the spec authors to call these functions. They kinda look like functions, but CSS "functions" as each is defined by its own grammar—there's no primitive function that specs reuse.