Skip to content

Commit

Permalink
feat(css): Add/Fix interfaces field of at-rules (#856)
Browse files Browse the repository at this point in the history
* feat(css): Add/Fix interfaces field of at-rules

* Update at-rules.md

* Update css/at-rules.md

---------

Co-authored-by: Brian Smith <[email protected]>
  • Loading branch information
skyclouds2001 and bsmth authored Jan 15, 2025
1 parent 13074e5 commit 20f0bab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
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

0 comments on commit 20f0bab

Please sign in to comment.