You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"name": "@container",
"prose": "The @container rule is a conditional group rule whose condition contains a container query, which is a boolean combination of container size queries and/or container style queries. Style declarations within the <block-contents> block of an @container rule are filtered by its condition to only match when the container query is true for their element’s query container.",
"href": "https://drafts.csswg.org/css-conditional-5/#at-ruledef-container",
"descriptors": [
{
"name": "width",
"href": "https://drafts.csswg.org/css-conditional-5/#descdef-container-width",
"for": "@container",
"value": "<length>",
"type": "range"
},
In practice, CSS specs do call that a descriptor too: width is defined with a data-dfn-type="descriptor" attribute in css-conditional-5, and the features are listed in an appendix named @container Descriptors.
The problem is that the term "descriptor" is overloaded in CSS. I do not see how the spec crawler could easily and automatically distinguish between something that can be used within the prelude and something that can be used within the final {}-block of an at-rule. It may be possible to make the crawler smart enough to parse the definition of the at-rule and understand where everything fits. Ideally, if the distinction is important, that distinction would also be explicit in the specs.
See also #479 which, I believe, raised the same problem for the @media at-rule.
@tabatkins Is this something that can be improved in the CSS specifications?
So that spec crawlers can distinguish between what is part of the prelude and what can be used in blocks?
For example in
css-conditional-5.json
:https://drafts.csswg.org/css-conditional-5/#descdef-container-width
This describes a container feature to be used in the atrule prelude:
It does not describe a descriptor.
The text was updated successfully, but these errors were encountered: