Skip to content

Commit

Permalink
Merge branch 'main' into feat/container-at-rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Netail authored Jan 15, 2025
2 parents 2e8f177 + ec560a1 commit ba5fd47
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 49 deletions.
23 changes: 14 additions & 9 deletions css/at-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,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 @@ -299,6 +298,9 @@
},
"@font-palette-values": {
"syntax": "@font-palette-values <dashed-ident> {\n <declaration-list>\n}",
"interfaces": [
"CSSFontPaletteValuesRule"
],
"groups": [
"CSS Fonts"
],
Expand Down Expand Up @@ -339,6 +341,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 @@ -373,10 +378,7 @@
"@media": {
"syntax": "@media <media-query-list> {\n <group-rule-body>\n}",
"interfaces": [
"CSSGroupingRule",
"CSSConditionRule",
"CSSMediaRule",
"CSSCustomMediaRule"
"CSSMediaRule"
],
"groups": [
"CSS Conditional Rules",
Expand All @@ -387,6 +389,9 @@
},
"@namespace": {
"syntax": "@namespace <namespace-prefix>? [ <string> | <url> ];",
"interfaces": [
"CSSNamespaceRule"
],
"groups": [
"CSS Namespaces"
],
Expand Down Expand Up @@ -470,7 +475,6 @@
"@property": {
"syntax": "@property <custom-property-name> {\n <declaration-list>\n}",
"interfaces": [
"CSS",
"CSSPropertyRule"
],
"groups": [
Expand Down Expand Up @@ -513,6 +517,9 @@
},
"@scope": {
"syntax": "@scope [(<scope-start>)]? [to (<scope-end>)]? {\n <rule-list>\n}",
"interfaces": [
"CSSScopeRule"
],
"groups": [
"CSS Conditional Rules"
],
Expand All @@ -533,8 +540,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
44 changes: 18 additions & 26 deletions css/functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/attr"
},
"blur()": {
"syntax": "blur( <length> )",
"syntax": "blur( <length>? )",
"groups": [
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/blur"
},
"brightness()": {
"syntax": "brightness( <number-percentage> )",
"syntax": "brightness( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects"
],
Expand Down Expand Up @@ -145,10 +145,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/gradient/conic-gradient"
},
"contrast()": {
"syntax": "contrast( [ <number-percentage> ] )",
"syntax": "contrast( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/contrast"
Expand Down Expand Up @@ -188,10 +187,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/cross-fade"
},
"drop-shadow()": {
"syntax": "drop-shadow( <length>{2,3} <color>? )",
"syntax": "drop-shadow( [ <color>? && <length>{2,3} ] )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/drop-shadow"
Expand Down Expand Up @@ -238,10 +236,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/fit-content_function"
},
"grayscale()": {
"syntax": "grayscale( <number-percentage> )",
"syntax": "grayscale( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/grayscale"
Expand All @@ -263,10 +260,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/color_value/hsl"
},
"hue-rotate()": {
"syntax": "hue-rotate( <angle> )",
"syntax": "hue-rotate( [ <angle> | <zero> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/hue-rotate"
Expand Down Expand Up @@ -313,10 +309,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/basic-shape/inset"
},
"invert()": {
"syntax": "invert( <number-percentage> )",
"syntax": "invert( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/invert"
Expand Down Expand Up @@ -447,10 +442,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/color_value/oklch"
},
"opacity()": {
"syntax": "opacity( [ <number-percentage> ] )",
"syntax": "opacity( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/opacity"
Expand Down Expand Up @@ -624,10 +618,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/round"
},
"saturate()": {
"syntax": "saturate( <number-percentage> )",
"syntax": "saturate( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/saturate"
Expand Down Expand Up @@ -681,10 +674,9 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/animation-timeline/scroll"
},
"sepia()": {
"syntax": "sepia( <number-percentage> )",
"syntax": "sepia( [ <number> | <percentage> ]? )",
"groups": [
"Filter Effects",
"CSS Color"
"Filter Effects"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter-function/sepia"
Expand Down
32 changes: 19 additions & 13 deletions css/syntaxes.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
"syntax": "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"
},
"blur()": {
"syntax": "blur( <length> )"
"syntax": "blur( <length>? )"
},
"brightness()": {
"syntax": "brightness( <number-percentage> )"
"syntax": "brightness( [ <number> | <percentage> ]? )"
},
"calc()": {
"syntax": "calc( <calc-sum> )"
Expand Down Expand Up @@ -144,7 +144,13 @@
"syntax": "<url>"
},
"color": {
"syntax": "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()> | <hex-color> | <named-color> | <system-color> | <deprecated-system-color> | currentcolor | transparent"
"syntax": "<color-base> | currentColor | <system-color> | <light-dark()> | <deprecated-system-color>"
},
"color-base": {
"syntax": "<hex-color> | <color-function> | <named-color> | <color-mix()> | transparent"
},
"color-function": {
"syntax": "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()>"
},
"color()": {
"syntax": "color( [from <color>]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )"
Expand Down Expand Up @@ -216,7 +222,7 @@
"syntax": "[ contextual | no-contextual ]"
},
"contrast()": {
"syntax": "contrast( [ <number-percentage> ] )"
"syntax": "contrast( [ <number> | <percentage> ]? )"
},
"coord-box": {
"syntax": "<paint-box> | view-box"
Expand Down Expand Up @@ -258,7 +264,7 @@
"syntax": "[ [ <length-percentage> | <number> ]+ ]#"
},
"deprecated-system-color": {
"syntax": "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"
"syntax": "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonHighlight | ButtonShadow | CaptionText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"
},
"discretionary-lig-values": {
"syntax": "[ discretionary-ligatures | no-discretionary-ligatures ]"
Expand All @@ -282,7 +288,7 @@
"syntax": "block | inline | run-in"
},
"drop-shadow()": {
"syntax": "drop-shadow( <length>{2,3} <color>? )"
"syntax": "drop-shadow( [ <color>? && <length>{2,3} ] )"
},
"easing-function": {
"syntax": "linear | <cubic-bezier-timing-function> | <step-timing-function>"
Expand Down Expand Up @@ -387,7 +393,7 @@
"syntax": "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()> | <repeating-conic-gradient()>"
},
"grayscale()": {
"syntax": "grayscale( <number-percentage> )"
"syntax": "grayscale( [ <number> | <percentage> ]? )"
},
"grid-line": {
"syntax": "auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]"
Expand All @@ -408,7 +414,7 @@
"syntax": "[ shorter | longer | increasing | decreasing ] hue"
},
"hue-rotate()": {
"syntax": "hue-rotate( <angle> )"
"syntax": "hue-rotate( [ <angle> | <zero> ]? )"
},
"hwb()": {
"syntax": "hwb( [<hue> | none] [<percentage> | none] [<percentage> | none] [ / [<alpha-value> | none] ]? )"
Expand Down Expand Up @@ -444,7 +450,7 @@
"syntax": "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )"
},
"invert()": {
"syntax": "invert( <number-percentage> )"
"syntax": "invert( [ <number> | <percentage> ]? )"
},
"keyframe-block": {
"syntax": "<keyframe-selector># {\n <declaration-list>\n}"
Expand Down Expand Up @@ -588,7 +594,7 @@
"syntax": "repeat( [ <integer [1,∞]> | auto-fill ], <line-names>+ )"
},
"named-color": {
"syntax": "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"
"syntax": "aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"
},
"namespace-prefix": {
"syntax": "<ident>"
Expand Down Expand Up @@ -621,7 +627,7 @@
"syntax": "oklch( [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ <hue> | none] [ / [<alpha-value> | none] ]? )"
},
"opacity()": {
"syntax": "opacity( [ <number-percentage> ] )"
"syntax": "opacity( [ <number> | <percentage> ]? )"
},
"opacity-value": {
"syntax": "<number> | <percentage>"
Expand Down Expand Up @@ -777,7 +783,7 @@
"syntax": "nearest | up | down | to-zero"
},
"saturate()": {
"syntax": "saturate( <number-percentage> )"
"syntax": "saturate( [ <number> | <percentage> ]? )"
},
"scale()": {
"syntax": "scale( [ <number> | <percentage> ]#{1,2} )"
Expand Down Expand Up @@ -813,7 +819,7 @@
"syntax": "center | start | end | self-start | self-end | flex-start | flex-end"
},
"sepia()": {
"syntax": "sepia( <number-percentage> )"
"syntax": "sepia( [ <number> | <percentage> ]? )"
},
"shadow": {
"syntax": "inset? && <length>{2,4} && <color>?"
Expand Down

0 comments on commit ba5fd47

Please sign in to comment.