Skip to content
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

feat(css): Add/Fix interfaces field of at-rules #856

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 14 additions & 9 deletions css/at-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@
"@document": {
"syntax": "@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {\n <group-rule-body>\n}",
"interfaces": [
"CSSGroupingRule",
"CSSConditionRule"
"CSSDocumentRule"
],
"groups": [
"CSS Conditional Rules"
Expand Down Expand Up @@ -288,6 +287,9 @@
},
"@font-palette-values": {
"syntax": "@font-palette-values <dashed-ident> {\n <declaration-list>\n}",
"interfaces": [
"CSSFontPaletteValuesRule"
],
"groups": [
"CSS Fonts"
],
Expand Down Expand Up @@ -328,6 +330,9 @@
},
"@import": {
"syntax": "@import [ <string> | <url> ]\n [ layer | layer(<layer-name>) ]?\n [ supports( [ <supports-condition> | <declaration> ] ) ]?\n <media-query-list>? ;",
"interfaces": [
"CSSImportRule"
],
"groups": [
"CSS Conditional Rules",
"Media Queries"
Expand Down Expand Up @@ -362,10 +367,7 @@
"@media": {
"syntax": "@media <media-query-list> {\n <group-rule-body>\n}",
"interfaces": [
"CSSGroupingRule",
"CSSConditionRule",
"CSSMediaRule",
"CSSCustomMediaRule"
"CSSMediaRule"
],
"groups": [
"CSS Conditional Rules",
Expand All @@ -376,6 +378,9 @@
},
"@namespace": {
"syntax": "@namespace <namespace-prefix>? [ <string> | <url> ];",
"interfaces": [
"CSSNamespaceRule"
],
"groups": [
"CSS Namespaces"
],
Expand Down Expand Up @@ -459,7 +464,6 @@
"@property": {
"syntax": "@property <custom-property-name> {\n <declaration-list>\n}",
"interfaces": [
"CSS",
"CSSPropertyRule"
],
"groups": [
Expand Down Expand Up @@ -502,6 +506,9 @@
},
"@scope": {
"syntax": "@scope [(<scope-start>)]? [to (<scope-end>)]? {\n <rule-list>\n}",
"interfaces": [
"CSSScopeRule"
],
"groups": [
"CSS Conditional Rules"
],
Expand All @@ -522,8 +529,6 @@
"@supports": {
"syntax": "@supports <supports-condition> {\n <group-rule-body>\n}",
"interfaces": [
"CSSGroupingRule",
"CSSConditionRule",
"CSSSupportsRule"
],
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion css/at-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The 3 properties seen above are all required:

There are 3 more properties that are optional:
* `mdn_url` (string): a URL linking to the at-rule's page on MDN. This URL must omit the localization part of the URL (such as `en-US/`).
* `interfaces` (array of strings): These are the [CSSOM](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model) interfaces that belong to the at-rule.
* `interfaces` (array of strings): These are the [CSSOM](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model) interfaces that belong to the at-rule. Note that inherited interfaces like `CSSGroupingRule` or `CSSConditionRule` should not be included.
* `descriptors` (object): see below

## Structure for at-rules with descriptors
Expand Down
Loading