Skip to content

Commit

Permalink
feat(css): Update syntax for an+b type (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyclouds2001 authored Feb 24, 2025
1 parent 2f71ad9 commit ffeb23b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
8 changes: 4 additions & 4 deletions css/selectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/:not"
},
":nth-child()": {
"syntax": ":nth-child( <nth> [ of <complex-selector-list> ]? )",
"syntax": ":nth-child( <an+b> [ of <complex-selector-list> ]? )",
"groups": [
"Pseudo-classes",
"Selectors"
Expand All @@ -525,7 +525,7 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/:nth-child"
},
":nth-last-child()": {
"syntax": ":nth-last-child( <nth> [ of <complex-selector-list> ]? )",
"syntax": ":nth-last-child( <an+b> [ of <complex-selector-list> ]? )",
"groups": [
"Pseudo-classes",
"Selectors"
Expand All @@ -534,7 +534,7 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/:nth-last-child"
},
":nth-last-of-type()": {
"syntax": ":nth-last-of-type( <nth> )",
"syntax": ":nth-last-of-type( <an+b> )",
"groups": [
"Pseudo-classes",
"Selectors"
Expand All @@ -543,7 +543,7 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/:nth-last-of-type"
},
":nth-of-type()": {
"syntax": ":nth-of-type( <nth> )",
"syntax": ":nth-of-type( <an+b> )",
"groups": [
"Pseudo-classes",
"Selectors"
Expand Down
30 changes: 27 additions & 3 deletions css/syntaxes.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"alpha-value": {
"syntax": "<number> | <percentage>"
},
"an+b": {
"syntax": "odd | even | <integer> | <n-dimension> | '+'?† n | -n | <ndashdigit-dimension> | '+'?† <ndashdigit-ident> | <dashndashdigit-ident> | <n-dimension> <signed-integer> | '+'?† n <signed-integer> | -n <signed-integer> | <ndash-dimension> <signless-integer> | '+'?† n- <signless-integer> | -n- <signless-integer> | <n-dimension> ['+' | '-'] <signless-integer> | '+'?† n ['+' | '-'] <signless-integer> | -n ['+' | '-'] <signless-integer>"
},
"anchor()": {
"syntax": "anchor( <anchor-name>? && <anchor-side>, <length-percentage>? )"
},
Expand Down Expand Up @@ -263,6 +266,9 @@
"dasharray": {
"syntax": "[ [ <length-percentage> | <number> ]+ ]#"
},
"dashndashdigit-ident": {
"syntax": "<ident-token>"
},
"deprecated-system-color": {
"syntax": "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonHighlight | ButtonShadow | CaptionText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"
},
Expand Down Expand Up @@ -422,6 +428,9 @@
"id-selector": {
"syntax": "<hash-token>"
},
"integer": {
"syntax": "<number-token>"
},
"image": {
"syntax": "<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>"
},
Expand Down Expand Up @@ -587,6 +596,18 @@
"mod()": {
"syntax": "mod( <calc-sum>, <calc-sum> )"
},
"n-dimension": {
"syntax": "<dimension-token>"
},
"ndash-dimension": {
"syntax": "<dimension-token>"
},
"ndashdigit-dimension": {
"syntax": "<dimension-token>"
},
"ndashdigit-ident": {
"syntax": "<ident-token>"
},
"name-repeat": {
"syntax": "repeat( [ <integer [1,∞]> | auto-fill ], <line-names>+ )"
},
Expand All @@ -599,9 +620,6 @@
"ns-prefix": {
"syntax": "[ <ident-token> | '*' ]? '|'"
},
"nth": {
"syntax": "<an-plus-b> | even | odd"
},
"number-percentage": {
"syntax": "<number> | <percentage>"
},
Expand Down Expand Up @@ -839,6 +857,12 @@
"sign()": {
"syntax": "sign( <calc-sum> )"
},
"signed-integer": {
"syntax": "<number-token>"
},
"signless-integer": {
"syntax": "<number-token>"
},
"sin()": {
"syntax": "sin( <calc-sum> )"
},
Expand Down
6 changes: 0 additions & 6 deletions css/types.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"an-plus-b": {
"groups": [
"Selectors"
],
"status": "standard"
},
"angle": {
"groups": [
"CSS Types"
Expand Down

0 comments on commit ffeb23b

Please sign in to comment.