Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions css/at-rules/container.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Comment on lines +39 to +42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"anchor_position_queries": {
"__compat": {
"description": "Anchor position queries (`anchored()`)",
"spec_url": "https://drafts.csswg.org/css-anchor-position-2/#anchored-container-queries",
"anchored_function": {
"__compat": {
"description": "`anchored()` function",
"spec_url": "https://drafts.csswg.org/css-anchor-position-2/#container-rule-anchored",

"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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we documenting this (behavioral?) subfeatures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 @container anchored(fallback: <some-value>).

Right now there's only one feature to query against, but it's possible other container query features could exist (e.g., @container anchored(foo-bar: <some-value>) would get a foo-bar key as a peer to fallback).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a suffix for clarity?

Suggested change
"fallback": {
"fallback_feature": {

"__compat": {
"description": "`fallback` container feature",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we're in the context of the @container at feature, mentioning "container" seems repetitive:

Suggested change
"description": "`fallback` container feature",
"description": "`fallback` feature",

"spec_url": "https://drafts.csswg.org/css-anchor-position-2/#anchored",
"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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add a suffix for clarity here?

(Unlike CSS properties, it is less obvious that this is a value.)

Suggested change
"any": {
"any_value": {

"__compat": {
"description": "`fallback` container feature",
"spec_url": "https://drafts.csswg.org/css-anchor-position-2/#anchored",
"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",
Expand Down
31 changes: 31 additions & 0 deletions css/properties/container-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,37 @@
"deprecated": false
}
},
"anchored": {
"__compat": {
"spec_url": "https://drafts.csswg.org/css-anchor-position-2/#container-type-anchored",
"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
}
}
},
"inline-size": {
"__compat": {
"spec_url": "https://drafts.csswg.org/css-conditional-5/#valdef-container-type-inline-size",
Expand Down