@tbela99/css-parser 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.editorconfig +484 -0
  2. package/README.md +13 -8
  3. package/dist/index-umd-web.js +2451 -2554
  4. package/dist/index.cjs +2605 -2708
  5. package/dist/index.d.ts +73 -23
  6. package/dist/lib/ast/expand.js +29 -4
  7. package/dist/lib/ast/math/expression.js +1 -1
  8. package/dist/lib/ast/minify.js +31 -17
  9. package/dist/lib/ast/types.js +2 -0
  10. package/dist/lib/ast/walk.js +12 -0
  11. package/dist/lib/parser/declaration/map.js +59 -52
  12. package/dist/lib/parser/declaration/set.js +0 -12
  13. package/dist/lib/parser/parse.js +204 -139
  14. package/dist/lib/parser/tokenize.js +15 -3
  15. package/dist/lib/renderer/color/color.js +2 -2
  16. package/dist/lib/renderer/color/hex.js +1 -1
  17. package/dist/lib/renderer/color/hsl.js +1 -1
  18. package/dist/lib/renderer/color/hwb.js +2 -2
  19. package/dist/lib/renderer/color/lab.js +3 -2
  20. package/dist/lib/renderer/color/lch.js +1 -1
  21. package/dist/lib/renderer/color/oklab.js +2 -2
  22. package/dist/lib/renderer/color/oklch.js +1 -1
  23. package/dist/lib/renderer/color/p3.js +1 -1
  24. package/dist/lib/renderer/color/prophotoRgb.js +2 -2
  25. package/dist/lib/renderer/color/prophotorgb.js +2 -2
  26. package/dist/lib/renderer/color/rgb.js +1 -1
  27. package/dist/lib/renderer/color/srgb.js +2 -2
  28. package/dist/lib/renderer/color/utils/constants.js +1 -1
  29. package/dist/lib/renderer/color/xyz.js +2 -18
  30. package/dist/lib/renderer/color/xyzd50.js +20 -2
  31. package/dist/lib/renderer/render.js +37 -8
  32. package/dist/lib/renderer/sourcemap/sourcemap.js +1 -1
  33. package/dist/lib/syntax/syntax.js +337 -1
  34. package/dist/lib/validation/at-rules/container.js +353 -0
  35. package/dist/lib/validation/at-rules/counter-style.js +2 -2
  36. package/dist/lib/validation/at-rules/custom-media.js +52 -0
  37. package/dist/lib/validation/at-rules/document.js +40 -60
  38. package/dist/lib/validation/at-rules/else.js +5 -0
  39. package/dist/lib/validation/at-rules/font-feature-values.js +3 -0
  40. package/dist/lib/validation/at-rules/import.js +64 -59
  41. package/dist/lib/validation/at-rules/layer.js +3 -0
  42. package/dist/lib/validation/at-rules/media.js +118 -29
  43. package/dist/lib/validation/at-rules/supports.js +51 -20
  44. package/dist/lib/validation/at-rules/when.js +178 -0
  45. package/dist/lib/validation/atrule.js +25 -10
  46. package/dist/lib/validation/config.js +20 -15
  47. package/dist/lib/validation/config.json.js +242 -74
  48. package/dist/lib/validation/declaration.js +32 -10
  49. package/dist/lib/validation/parser/parse.js +87 -103
  50. package/dist/lib/validation/parser/types.js +2 -2
  51. package/dist/lib/validation/selector.js +6 -3
  52. package/dist/lib/validation/syntax.js +86 -6
  53. package/dist/lib/validation/syntaxes/complex-selector-list.js +16 -12
  54. package/dist/lib/validation/syntaxes/complex-selector.js +17 -247
  55. package/dist/lib/validation/syntaxes/compound-selector.js +226 -0
  56. package/dist/lib/validation/syntaxes/image.js +29 -0
  57. package/dist/lib/validation/syntaxes/keyframe-block-list.js +1 -1
  58. package/dist/lib/validation/syntaxes/keyframe-selector.js +1 -1
  59. package/dist/lib/validation/syntaxes/layer-name.js +5 -16
  60. package/dist/lib/validation/syntaxes/relative-selector-list.js +43 -13
  61. package/dist/lib/validation/utils/list.js +2 -2
  62. package/dist/node/index.js +1 -1
  63. package/dist/web/index.js +1 -1
  64. package/package.json +10 -9
@@ -372,7 +372,7 @@ var declarations = {
372
372
  syntax: "auto || <ratio>"
373
373
  },
374
374
  "backdrop-filter": {
375
- syntax: "none | <filter-function-list>"
375
+ syntax: "none | <filter-value-list>"
376
376
  },
377
377
  "backface-visibility": {
378
378
  syntax: "visible | hidden"
@@ -786,7 +786,7 @@ var declarations = {
786
786
  syntax: "nonzero | evenodd"
787
787
  },
788
788
  filter: {
789
- syntax: "none | <filter-function-list>"
789
+ syntax: "none | <filter-value-list>"
790
790
  },
791
791
  flex: {
792
792
  syntax: "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]"
@@ -995,9 +995,6 @@ var declarations = {
995
995
  "inline-size": {
996
996
  syntax: "<'width'>"
997
997
  },
998
- "input-security": {
999
- syntax: "auto | none"
1000
- },
1001
998
  inset: {
1002
999
  syntax: "<'top'>{1,4}"
1003
1000
  },
@@ -1245,7 +1242,7 @@ var declarations = {
1245
1242
  syntax: "<integer>"
1246
1243
  },
1247
1244
  outline: {
1248
- syntax: "[ <'outline-width'> || <'outline-style'> || <'outline-color'> ]"
1245
+ syntax: "<'outline-width'> || <'outline-style'> || <'outline-color'>"
1249
1246
  },
1250
1247
  "outline-color": {
1251
1248
  syntax: "auto | <color>"
@@ -1556,6 +1553,9 @@ var declarations = {
1556
1553
  "shape-rendering": {
1557
1554
  syntax: "auto | optimizeSpeed | crispEdges | geometricPrecision"
1558
1555
  },
1556
+ "speak-as": {
1557
+ syntax: "normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"
1558
+ },
1559
1559
  "stop-color": {
1560
1560
  syntax: "<'color'>"
1561
1561
  },
@@ -1668,10 +1668,10 @@ var declarations = {
1668
1668
  syntax: "none | auto | <percentage>"
1669
1669
  },
1670
1670
  "text-spacing-trim": {
1671
- syntax: "space-all | normal | space-first | trim-start | trim-both | trim-all | auto"
1671
+ syntax: "space-all | normal | space-first | trim-start"
1672
1672
  },
1673
1673
  "text-transform": {
1674
- syntax: "none | capitalize | uppercase | lowercase | full-width | full-size-kana"
1674
+ syntax: "none | [ capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto"
1675
1675
  },
1676
1676
  "text-underline-offset": {
1677
1677
  syntax: "auto | <length> | <percentage> "
@@ -1761,10 +1761,10 @@ var declarations = {
1761
1761
  syntax: "visible | hidden | collapse"
1762
1762
  },
1763
1763
  "white-space": {
1764
- syntax: "normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> ]"
1764
+ syntax: "normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'>"
1765
1765
  },
1766
1766
  "white-space-collapse": {
1767
- syntax: "collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces"
1767
+ syntax: "collapse | preserve | preserve-breaks | preserve-spaces | break-spaces"
1768
1768
  },
1769
1769
  widows: {
1770
1770
  syntax: "<integer>"
@@ -1797,7 +1797,7 @@ var declarations = {
1797
1797
  syntax: "auto | <integer>"
1798
1798
  },
1799
1799
  zoom: {
1800
- syntax: "normal | reset | <number> | <percentage>"
1800
+ syntax: "normal | reset | <number [0,∞]> || <percentage [0,∞]>"
1801
1801
  }
1802
1802
  };
1803
1803
  var functions = {
@@ -1826,10 +1826,10 @@ var functions = {
1826
1826
  syntax: "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )"
1827
1827
  },
1828
1828
  blur: {
1829
- syntax: "blur( <length> )"
1829
+ syntax: "blur( <length>? )"
1830
1830
  },
1831
1831
  brightness: {
1832
- syntax: "brightness( <number-percentage> )"
1832
+ syntax: "brightness( [ <number> | <percentage> ]? )"
1833
1833
  },
1834
1834
  calc: {
1835
1835
  syntax: "calc( <calc-sum> )"
@@ -1838,7 +1838,7 @@ var functions = {
1838
1838
  syntax: "calc-size( <calc-size-basis>, <calc-sum> )"
1839
1839
  },
1840
1840
  circle: {
1841
- syntax: "circle( [ <shape-radius> ]? [ at <position> ]? )"
1841
+ syntax: "circle( <radial-size>? [ at <position> ]? )"
1842
1842
  },
1843
1843
  clamp: {
1844
1844
  syntax: "clamp( <calc-sum>#{3} )"
@@ -1853,7 +1853,7 @@ var functions = {
1853
1853
  syntax: "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )"
1854
1854
  },
1855
1855
  contrast: {
1856
- syntax: "contrast( [ <number-percentage> ] )"
1856
+ syntax: "contrast( [ <number> | <percentage> ]? )"
1857
1857
  },
1858
1858
  cos: {
1859
1859
  syntax: "cos( <calc-sum> )"
@@ -1868,13 +1868,13 @@ var functions = {
1868
1868
  syntax: "cross-fade( <cf-mixing-image> , <cf-final-image>? )"
1869
1869
  },
1870
1870
  "drop-shadow": {
1871
- syntax: "drop-shadow( <length>{2,3} <color>? )"
1871
+ syntax: "drop-shadow( [ <color>? && <length>{2,3} ] )"
1872
1872
  },
1873
1873
  element: {
1874
1874
  syntax: "element( <id-selector> )"
1875
1875
  },
1876
1876
  ellipse: {
1877
- syntax: "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )"
1877
+ syntax: "ellipse( <radial-size>? [ at <position> ]? )"
1878
1878
  },
1879
1879
  env: {
1880
1880
  syntax: "env( <custom-ident> , <declaration-value>? )"
@@ -1886,19 +1886,19 @@ var functions = {
1886
1886
  syntax: "fit-content( <length-percentage [0,∞]> )"
1887
1887
  },
1888
1888
  grayscale: {
1889
- syntax: "grayscale( <number-percentage> )"
1889
+ syntax: "grayscale( [ <number> | <percentage> ]? )"
1890
1890
  },
1891
1891
  hsl: {
1892
- syntax: "hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )"
1892
+ syntax: "hsl( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsl( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )"
1893
1893
  },
1894
1894
  hsla: {
1895
- syntax: "hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )"
1895
+ syntax: "hsla( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsla( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )"
1896
1896
  },
1897
1897
  "hue-rotate": {
1898
- syntax: "hue-rotate( <angle> )"
1898
+ syntax: "hue-rotate( [ <angle> | <zero> ]? )"
1899
1899
  },
1900
1900
  hwb: {
1901
- syntax: "hwb( [<hue> | none] [<percentage> | none] [<percentage> | none] [ / [<alpha-value> | none] ]? )"
1901
+ syntax: "hwb( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )"
1902
1902
  },
1903
1903
  hypot: {
1904
1904
  syntax: "hypot( <calc-sum># )"
@@ -1913,7 +1913,7 @@ var functions = {
1913
1913
  syntax: "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )"
1914
1914
  },
1915
1915
  invert: {
1916
- syntax: "invert( <number-percentage> )"
1916
+ syntax: "invert( [ <number> | <percentage> ]? )"
1917
1917
  },
1918
1918
  lab: {
1919
1919
  syntax: "lab( [<percentage> | <number> | none] [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ / [<alpha-value> | none] ]? )"
@@ -1961,7 +1961,7 @@ var functions = {
1961
1961
  syntax: "oklch( [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ <hue> | none] [ / [<alpha-value> | none] ]? )"
1962
1962
  },
1963
1963
  opacity: {
1964
- syntax: "opacity( [ <number-percentage> ] )"
1964
+ syntax: "opacity( [ <number> | <percentage> ]? )"
1965
1965
  },
1966
1966
  paint: {
1967
1967
  syntax: "paint( <ident>, <declaration-value>? )"
@@ -1970,13 +1970,13 @@ var functions = {
1970
1970
  syntax: "palette-mix(<color-interpolation-method> , [ [normal | light | dark | <palette-identifier> | <palette-mix()> ] && <percentage [0,100]>? ]#{2})"
1971
1971
  },
1972
1972
  path: {
1973
- syntax: "path( [ <fill-rule>, ]? <string> )"
1973
+ syntax: "path( <'fill-rule'>? , <string> )"
1974
1974
  },
1975
1975
  perspective: {
1976
1976
  syntax: "perspective( [ <length [0,∞]> | none ] )"
1977
1977
  },
1978
1978
  polygon: {
1979
- syntax: "polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"
1979
+ syntax: "polygon( <'fill-rule'>? , [ <length-percentage> <length-percentage> ]# )"
1980
1980
  },
1981
1981
  pow: {
1982
1982
  syntax: "pow( <calc-sum>, <calc-sum> )"
@@ -1987,6 +1987,9 @@ var functions = {
1987
1987
  ray: {
1988
1988
  syntax: "ray( <angle> && <ray-size>? && contain? && [at <position>]? )"
1989
1989
  },
1990
+ rect: {
1991
+ syntax: "rect( [ <length-percentage> | auto ]{4} [ round <'border-radius'> ]? )"
1992
+ },
1990
1993
  rem: {
1991
1994
  syntax: "rem( <calc-sum>, <calc-sum> )"
1992
1995
  },
@@ -2000,10 +2003,10 @@ var functions = {
2000
2003
  syntax: "repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
2001
2004
  },
2002
2005
  rgb: {
2003
- syntax: "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"
2006
+ syntax: "rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? ) | rgb( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? )"
2004
2007
  },
2005
2008
  rgba: {
2006
- syntax: "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"
2009
+ syntax: "rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? ) | rgba( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? )"
2007
2010
  },
2008
2011
  rotate: {
2009
2012
  syntax: "rotate( [ <angle> | <zero> ] )"
@@ -2024,7 +2027,7 @@ var functions = {
2024
2027
  syntax: "round( <rounding-strategy>?, <calc-sum>, <calc-sum> )"
2025
2028
  },
2026
2029
  saturate: {
2027
- syntax: "saturate( <number-percentage> )"
2030
+ syntax: "saturate( [ <number> | <percentage> ]? )"
2028
2031
  },
2029
2032
  scale: {
2030
2033
  syntax: "scale( [ <number> | <percentage> ]#{1,2} )"
@@ -2045,7 +2048,7 @@ var functions = {
2045
2048
  syntax: "scroll( [ <scroller> || <axis> ]? )"
2046
2049
  },
2047
2050
  sepia: {
2048
- syntax: "sepia( <number-percentage> )"
2051
+ syntax: "sepia( [ <number> | <percentage> ]? )"
2049
2052
  },
2050
2053
  sign: {
2051
2054
  syntax: "sign( <calc-sum> )"
@@ -2065,6 +2068,9 @@ var functions = {
2065
2068
  sqrt: {
2066
2069
  syntax: "sqrt( <calc-sum> )"
2067
2070
  },
2071
+ symbols: {
2072
+ syntax: "symbols( <symbols-type>? [ <string> | <image> ]+ )"
2073
+ },
2068
2074
  tan: {
2069
2075
  syntax: "tan( <calc-sum> )"
2070
2076
  },
@@ -2097,6 +2103,9 @@ var functions = {
2097
2103
  },
2098
2104
  view: {
2099
2105
  syntax: "view([<axis> || <'view-timeline-inset'>]?)"
2106
+ },
2107
+ xywh: {
2108
+ syntax: "xywh( <length-percentage>{2} <length-percentage [0,∞]>{2} [ round <'border-radius'> ]? )"
2100
2109
  }
2101
2110
  };
2102
2111
  var syntaxes = {
@@ -2112,6 +2121,9 @@ var syntaxes = {
2112
2121
  "alpha-value": {
2113
2122
  syntax: "<number> | <percentage>"
2114
2123
  },
2124
+ "an+b": {
2125
+ 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>"
2126
+ },
2115
2127
  "anchor()": {
2116
2128
  syntax: "anchor( <anchor-name>? && <anchor-side>, <length-percentage>? )"
2117
2129
  },
@@ -2200,10 +2212,10 @@ var syntaxes = {
2200
2212
  syntax: "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"
2201
2213
  },
2202
2214
  "blur()": {
2203
- syntax: "blur( <length> )"
2215
+ syntax: "blur( <length>? )"
2204
2216
  },
2205
2217
  "brightness()": {
2206
- syntax: "brightness( <number-percentage> )"
2218
+ syntax: "brightness( [ <number> | <percentage> ]? )"
2207
2219
  },
2208
2220
  "calc()": {
2209
2221
  syntax: "calc( <calc-sum> )"
@@ -2233,7 +2245,7 @@ var syntaxes = {
2233
2245
  syntax: "<percentage>? && <image>"
2234
2246
  },
2235
2247
  "circle()": {
2236
- syntax: "circle( [ <shape-radius> ]? [ at <position> ]? )"
2248
+ syntax: "circle( <radial-size>? [ at <position> ]? )"
2237
2249
  },
2238
2250
  "clamp()": {
2239
2251
  syntax: "clamp( <calc-sum>#{3} )"
@@ -2245,10 +2257,16 @@ var syntaxes = {
2245
2257
  syntax: "<url>"
2246
2258
  },
2247
2259
  color: {
2248
- syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()> | <hex-color> | <named-color> | <system-color> | <deprecated-system-color> | currentcolor | transparent"
2260
+ syntax: "<color-base> | currentColor | <system-color> | <light-dark()> | <deprecated-system-color>"
2249
2261
  },
2250
2262
  "color()": {
2251
- syntax: "color( [from <color>]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )"
2263
+ syntax: "color( [ from <color> ]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )"
2264
+ },
2265
+ "color-base": {
2266
+ syntax: "<hex-color> | <color-function> | <named-color> | <color-mix()> | transparent"
2267
+ },
2268
+ "color-function": {
2269
+ syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()>"
2252
2270
  },
2253
2271
  "color-interpolation-method": {
2254
2272
  syntax: "in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? | <custom-color-space> ]"
@@ -2317,7 +2335,7 @@ var syntaxes = {
2317
2335
  syntax: "[ contextual | no-contextual ]"
2318
2336
  },
2319
2337
  "contrast()": {
2320
- syntax: "contrast( [ <number-percentage> ] )"
2338
+ syntax: "contrast( [ <number> | <percentage> ]? )"
2321
2339
  },
2322
2340
  "coord-box": {
2323
2341
  syntax: "<paint-box> | view-box"
@@ -2358,8 +2376,11 @@ var syntaxes = {
2358
2376
  dasharray: {
2359
2377
  syntax: "[ [ <length-percentage> | <number> ]+ ]#"
2360
2378
  },
2379
+ "dashndashdigit-ident": {
2380
+ syntax: "<ident-token>"
2381
+ },
2361
2382
  "deprecated-system-color": {
2362
- 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"
2383
+ syntax: "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonHighlight | ButtonShadow | CaptionText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"
2363
2384
  },
2364
2385
  "discretionary-lig-values": {
2365
2386
  syntax: "[ discretionary-ligatures | no-discretionary-ligatures ]"
@@ -2383,7 +2404,7 @@ var syntaxes = {
2383
2404
  syntax: "block | inline | run-in"
2384
2405
  },
2385
2406
  "drop-shadow()": {
2386
- syntax: "drop-shadow( <length>{2,3} <color>? )"
2407
+ syntax: "drop-shadow( [ <color>? && <length>{2,3} ] )"
2387
2408
  },
2388
2409
  "easing-function": {
2389
2410
  syntax: "linear | <cubic-bezier-timing-function> | <step-timing-function>"
@@ -2398,7 +2419,7 @@ var syntaxes = {
2398
2419
  syntax: "element( <id-selector> )"
2399
2420
  },
2400
2421
  "ellipse()": {
2401
- syntax: "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )"
2422
+ syntax: "ellipse( <radial-size>? [ at <position> ]? )"
2402
2423
  },
2403
2424
  "ending-shape": {
2404
2425
  syntax: "circle | ellipse"
@@ -2436,13 +2457,10 @@ var syntaxes = {
2436
2457
  "feature-value-name": {
2437
2458
  syntax: "<custom-ident>"
2438
2459
  },
2439
- "fill-rule": {
2440
- syntax: "nonzero | evenodd"
2441
- },
2442
2460
  "filter-function": {
2443
2461
  syntax: "<blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>"
2444
2462
  },
2445
- "filter-function-list": {
2463
+ "filter-value-list": {
2446
2464
  syntax: "[ <filter-function> | <url> ]+"
2447
2465
  },
2448
2466
  "final-bg-layer": {
@@ -2488,7 +2506,7 @@ var syntaxes = {
2488
2506
  syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()> | <repeating-conic-gradient()>"
2489
2507
  },
2490
2508
  "grayscale()": {
2491
- syntax: "grayscale( <number-percentage> )"
2509
+ syntax: "grayscale( [ <number> | <percentage> ]? )"
2492
2510
  },
2493
2511
  "grid-line": {
2494
2512
  syntax: "auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]"
@@ -2497,10 +2515,10 @@ var syntaxes = {
2497
2515
  syntax: "[ historical-ligatures | no-historical-ligatures ]"
2498
2516
  },
2499
2517
  "hsl()": {
2500
- syntax: "hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )"
2518
+ syntax: "hsl( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsl( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )"
2501
2519
  },
2502
2520
  "hsla()": {
2503
- syntax: "hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )"
2521
+ syntax: "hsla( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsla( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )"
2504
2522
  },
2505
2523
  hue: {
2506
2524
  syntax: "<number> | <angle>"
@@ -2509,10 +2527,10 @@ var syntaxes = {
2509
2527
  syntax: "[ shorter | longer | increasing | decreasing ] hue"
2510
2528
  },
2511
2529
  "hue-rotate()": {
2512
- syntax: "hue-rotate( <angle> )"
2530
+ syntax: "hue-rotate( [ <angle> | <zero> ]? )"
2513
2531
  },
2514
2532
  "hwb()": {
2515
- syntax: "hwb( [<hue> | none] [<percentage> | none] [<percentage> | none] [ / [<alpha-value> | none] ]? )"
2533
+ syntax: "hwb( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? )"
2516
2534
  },
2517
2535
  "hypot()": {
2518
2536
  syntax: "hypot( <calc-sum># )"
@@ -2520,6 +2538,9 @@ var syntaxes = {
2520
2538
  "id-selector": {
2521
2539
  syntax: "<hash-token>"
2522
2540
  },
2541
+ integer: {
2542
+ syntax: "<number-token>"
2543
+ },
2523
2544
  image: {
2524
2545
  syntax: "<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>"
2525
2546
  },
@@ -2530,7 +2551,7 @@ var syntaxes = {
2530
2551
  syntax: "image-set( <image-set-option># )"
2531
2552
  },
2532
2553
  "image-set-option": {
2533
- syntax: "[ <image> | <string> ]x [ <resolution> || type(<string>) ]"
2554
+ syntax: "[ <image> | <string> ] [ <resolution> || type(<string>) ]"
2534
2555
  },
2535
2556
  "image-src": {
2536
2557
  syntax: "<url> | <string>"
@@ -2545,7 +2566,7 @@ var syntaxes = {
2545
2566
  syntax: "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )"
2546
2567
  },
2547
2568
  "invert()": {
2548
- syntax: "invert( <number-percentage> )"
2569
+ syntax: "invert( [ <number> | <percentage> ]? )"
2549
2570
  },
2550
2571
  "keyframe-block": {
2551
2572
  syntax: "<keyframe-selector># {\n <declaration-list>\n}"
@@ -2685,11 +2706,23 @@ var syntaxes = {
2685
2706
  "mod()": {
2686
2707
  syntax: "mod( <calc-sum>, <calc-sum> )"
2687
2708
  },
2709
+ "n-dimension": {
2710
+ syntax: "<dimension-token>"
2711
+ },
2712
+ "ndash-dimension": {
2713
+ syntax: "<dimension-token>"
2714
+ },
2715
+ "ndashdigit-dimension": {
2716
+ syntax: "<dimension-token>"
2717
+ },
2718
+ "ndashdigit-ident": {
2719
+ syntax: "<ident-token>"
2720
+ },
2688
2721
  "name-repeat": {
2689
2722
  syntax: "repeat( [ <integer [1,∞]> | auto-fill ], <line-names>+ )"
2690
2723
  },
2691
2724
  "named-color": {
2692
- 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"
2725
+ 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"
2693
2726
  },
2694
2727
  "namespace-prefix": {
2695
2728
  syntax: "<ident>"
@@ -2697,9 +2730,6 @@ var syntaxes = {
2697
2730
  "ns-prefix": {
2698
2731
  syntax: "[ <ident-token> | '*' ]? '|'"
2699
2732
  },
2700
- nth: {
2701
- syntax: "<an-plus-b> | even | odd"
2702
- },
2703
2733
  "number-percentage": {
2704
2734
  syntax: "<number> | <percentage>"
2705
2735
  },
@@ -2722,7 +2752,7 @@ var syntaxes = {
2722
2752
  syntax: "oklch( [ <percentage> | <number> | none] [ <percentage> | <number> | none] [ <hue> | none] [ / [<alpha-value> | none] ]? )"
2723
2753
  },
2724
2754
  "opacity()": {
2725
- syntax: "opacity( [ <number-percentage> ] )"
2755
+ syntax: "opacity( [ <number> | <percentage> ]? )"
2726
2756
  },
2727
2757
  "opacity-value": {
2728
2758
  syntax: "<number> | <percentage>"
@@ -2770,7 +2800,7 @@ var syntaxes = {
2770
2800
  syntax: "palette-mix(<color-interpolation-method> , [ [normal | light | dark | <palette-identifier> | <palette-mix()> ] && <percentage [0,100]>? ]#{2})"
2771
2801
  },
2772
2802
  "path()": {
2773
- syntax: "path( [ <fill-rule>, ]? <string> )"
2803
+ syntax: "path( <'fill-rule'>? , <string> )"
2774
2804
  },
2775
2805
  "perspective()": {
2776
2806
  syntax: "perspective( [ <length [0,∞]> | none ] )"
@@ -2779,7 +2809,7 @@ var syntaxes = {
2779
2809
  syntax: "hsl | hwb | lch | oklch"
2780
2810
  },
2781
2811
  "polygon()": {
2782
- syntax: "polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"
2812
+ syntax: "polygon( <'fill-rule'>? , [ <length-percentage> <length-percentage> ]# )"
2783
2813
  },
2784
2814
  position: {
2785
2815
  syntax: "[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]"
@@ -2808,9 +2838,15 @@ var syntaxes = {
2808
2838
  quote: {
2809
2839
  syntax: "open-quote | close-quote | no-open-quote | no-close-quote"
2810
2840
  },
2841
+ "radial-extent": {
2842
+ syntax: "closest-corner | closest-side | farthest-corner | farthest-side"
2843
+ },
2811
2844
  "radial-gradient()": {
2812
2845
  syntax: "radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
2813
2846
  },
2847
+ "radial-size": {
2848
+ syntax: "<radial-extent> | <length [0,∞]> | <length-percentage [0,∞]>{2}"
2849
+ },
2814
2850
  ratio: {
2815
2851
  syntax: "<number [0,∞]> [ / <number [0,∞]> ]?"
2816
2852
  },
@@ -2832,6 +2868,9 @@ var syntaxes = {
2832
2868
  "relative-size": {
2833
2869
  syntax: "larger | smaller"
2834
2870
  },
2871
+ "rect()": {
2872
+ syntax: "rect( [ <length-percentage> | auto ]{4} [ round <'border-radius'> ]? )"
2873
+ },
2835
2874
  "rem()": {
2836
2875
  syntax: "rem( <calc-sum>, <calc-sum> )"
2837
2876
  },
@@ -2851,10 +2890,10 @@ var syntaxes = {
2851
2890
  syntax: "reversed( <counter-name> )"
2852
2891
  },
2853
2892
  "rgb()": {
2854
- syntax: "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"
2893
+ syntax: "rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? ) | rgb( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? )"
2855
2894
  },
2856
2895
  "rgba()": {
2857
- syntax: "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"
2896
+ syntax: "rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? ) | rgba( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? )"
2858
2897
  },
2859
2898
  "rotate()": {
2860
2899
  syntax: "rotate( [ <angle> | <zero> ] )"
@@ -2878,7 +2917,7 @@ var syntaxes = {
2878
2917
  syntax: "nearest | up | down | to-zero"
2879
2918
  },
2880
2919
  "saturate()": {
2881
- syntax: "saturate( <number-percentage> )"
2920
+ syntax: "saturate( [ <number> | <percentage> ]? )"
2882
2921
  },
2883
2922
  "scale()": {
2884
2923
  syntax: "scale( [ <number> | <percentage> ]#{1,2} )"
@@ -2914,7 +2953,7 @@ var syntaxes = {
2914
2953
  syntax: "center | start | end | self-start | self-end | flex-start | flex-end"
2915
2954
  },
2916
2955
  "sepia()": {
2917
- syntax: "sepia( <number-percentage> )"
2956
+ syntax: "sepia( [ <number> | <percentage> ]? )"
2918
2957
  },
2919
2958
  shadow: {
2920
2959
  syntax: "inset? && <length>{2,4} && <color>?"
@@ -2928,15 +2967,18 @@ var syntaxes = {
2928
2967
  "shape-box": {
2929
2968
  syntax: "<visual-box> | margin-box"
2930
2969
  },
2931
- "shape-radius": {
2932
- syntax: "<length-percentage> | closest-side | farthest-side"
2933
- },
2934
2970
  "side-or-corner": {
2935
2971
  syntax: "[ left | right ] || [ top | bottom ]"
2936
2972
  },
2937
2973
  "sign()": {
2938
2974
  syntax: "sign( <calc-sum> )"
2939
2975
  },
2976
+ "signed-integer": {
2977
+ syntax: "<number-token>"
2978
+ },
2979
+ "signless-integer": {
2980
+ syntax: "<number-token>"
2981
+ },
2940
2982
  "sin()": {
2941
2983
  syntax: "sin( <calc-sum> )"
2942
2984
  },
@@ -3009,6 +3051,12 @@ var syntaxes = {
3009
3051
  symbol: {
3010
3052
  syntax: "<string> | <image> | <custom-ident>"
3011
3053
  },
3054
+ "symbols()": {
3055
+ syntax: "symbols( <symbols-type>? [ <string> | <image> ]+ )"
3056
+ },
3057
+ "symbols-type": {
3058
+ syntax: "cyclic | numeric | alphabetic | symbolic | fixed"
3059
+ },
3012
3060
  "system-color": {
3013
3061
  syntax: "AccentColor | AccentColorText | ActiveText | ButtonBorder | ButtonFace | ButtonText | Canvas | CanvasText | Field | FieldText | GrayText | Highlight | HighlightText | LinkText | Mark | MarkText | SelectedItem | SelectedItemText | VisitedText"
3014
3062
  },
@@ -3099,6 +3147,9 @@ var syntaxes = {
3099
3147
  "wq-name": {
3100
3148
  syntax: "<ns-prefix>? <ident-token>"
3101
3149
  },
3150
+ "xywh()": {
3151
+ syntax: "xywh( <length-percentage>{2} <length-percentage [0,∞]>{2} [ round <'border-radius'> ]? )"
3152
+ },
3102
3153
  xyz: {
3103
3154
  syntax: "xyz | xyz-d50 | xyz-d65"
3104
3155
  },
@@ -3234,16 +3285,16 @@ var selectors = {
3234
3285
  syntax: ":not( <complex-selector-list> )"
3235
3286
  },
3236
3287
  ":nth-child()": {
3237
- syntax: ":nth-child( <nth> [ of <complex-selector-list> ]? )"
3288
+ syntax: ":nth-child( <an+b> [ of <complex-selector-list> ]? )"
3238
3289
  },
3239
3290
  ":nth-last-child()": {
3240
- syntax: ":nth-last-child( <nth> [ of <complex-selector-list> ]? )"
3291
+ syntax: ":nth-last-child( <an+b> [ of <complex-selector-list> ]? )"
3241
3292
  },
3242
3293
  ":nth-last-of-type()": {
3243
- syntax: ":nth-last-of-type( <nth> )"
3294
+ syntax: ":nth-last-of-type( <an+b> )"
3244
3295
  },
3245
3296
  ":nth-of-type()": {
3246
- syntax: ":nth-of-type( <nth> )"
3297
+ syntax: ":nth-of-type( <an+b> )"
3247
3298
  },
3248
3299
  ":only-child": {
3249
3300
  syntax: ":only-child"
@@ -3479,19 +3530,103 @@ var atRules = {
3479
3530
  syntax: "@charset \"<charset>\";"
3480
3531
  },
3481
3532
  "@counter-style": {
3482
- syntax: "@counter-style <counter-style-name> {\n [ system: <counter-system>; ] ||\n [ symbols: <counter-symbols>; ] ||\n [ additive-symbols: <additive-symbols>; ] ||\n [ negative: <negative-symbol>; ] ||\n [ prefix: <prefix>; ] ||\n [ suffix: <suffix>; ] ||\n [ range: <range>; ] ||\n [ pad: <padding>; ] ||\n [ speak-as: <speak-as>; ] ||\n [ fallback: <counter-style-name>; ]\n}"
3533
+ syntax: "@counter-style <counter-style-name> {\n [ system: <counter-system>; ] ||\n [ symbols: <counter-symbols>; ] ||\n [ additive-symbols: <additive-symbols>; ] ||\n [ negative: <negative-symbol>; ] ||\n [ prefix: <prefix>; ] ||\n [ suffix: <suffix>; ] ||\n [ range: <range>; ] ||\n [ pad: <padding>; ] ||\n [ speak-as: <speak-as>; ] ||\n [ fallback: <counter-style-name>; ]\n}",
3534
+ descriptors: {
3535
+ "additive-symbols": {
3536
+ syntax: "[ <integer> && <symbol> ]#"
3537
+ },
3538
+ fallback: {
3539
+ syntax: "<counter-style-name>"
3540
+ },
3541
+ negative: {
3542
+ syntax: "<symbol> <symbol>?"
3543
+ },
3544
+ pad: {
3545
+ syntax: "<integer> && <symbol>"
3546
+ },
3547
+ prefix: {
3548
+ syntax: "<symbol>"
3549
+ },
3550
+ range: {
3551
+ syntax: "[ [ <integer> | infinite ]{2} ]# | auto"
3552
+ },
3553
+ "speak-as": {
3554
+ syntax: "auto | bullets | numbers | words | spell-out | <counter-style-name>"
3555
+ },
3556
+ suffix: {
3557
+ syntax: "<symbol>"
3558
+ },
3559
+ symbols: {
3560
+ syntax: "<symbol>+"
3561
+ },
3562
+ system: {
3563
+ syntax: "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]"
3564
+ }
3565
+ }
3483
3566
  },
3484
3567
  "@document": {
3485
3568
  syntax: "@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {\n <group-rule-body>\n}"
3486
3569
  },
3487
3570
  "@font-face": {
3488
- syntax: "@font-face {\n [ font-family: <family-name>; ] ||\n [ src: <src>; ] ||\n [ unicode-range: <unicode-range>; ] ||\n [ font-variant: <font-variant>; ] ||\n [ font-feature-settings: <font-feature-settings>; ] ||\n [ font-variation-settings: <font-variation-settings>; ] ||\n [ font-stretch: <font-stretch>; ] ||\n [ font-weight: <font-weight>; ] ||\n [ font-style: <font-style>; ] ||\n [ size-adjust: <size-adjust>; ] ||\n [ ascent-override: <ascent-override>; ] ||\n [ descent-override: <descent-override>; ] ||\n [ line-gap-override: <line-gap-override>; ]\n}"
3571
+ syntax: "@font-face {\n [ font-family: <family-name>; ] ||\n [ src: <src>; ] ||\n [ unicode-range: <unicode-range>; ] ||\n [ font-variant: <font-variant>; ] ||\n [ font-feature-settings: <font-feature-settings>; ] ||\n [ font-variation-settings: <font-variation-settings>; ] ||\n [ font-stretch: <font-stretch>; ] ||\n [ font-weight: <font-weight>; ] ||\n [ font-style: <font-style>; ] ||\n [ size-adjust: <size-adjust>; ] ||\n [ ascent-override: <ascent-override>; ] ||\n [ descent-override: <descent-override>; ] ||\n [ line-gap-override: <line-gap-override>; ]\n}",
3572
+ descriptors: {
3573
+ "ascent-override": {
3574
+ syntax: "normal | <percentage>"
3575
+ },
3576
+ "descent-override": {
3577
+ syntax: "normal | <percentage>"
3578
+ },
3579
+ "font-display": {
3580
+ syntax: "auto | block | swap | fallback | optional"
3581
+ },
3582
+ "font-family": {
3583
+ syntax: "<family-name>"
3584
+ },
3585
+ "font-feature-settings": {
3586
+ syntax: "normal | <feature-tag-value>#"
3587
+ },
3588
+ "font-stretch": {
3589
+ syntax: "<font-stretch-absolute>{1,2}"
3590
+ },
3591
+ "font-style": {
3592
+ syntax: "normal | italic | oblique <angle>{0,2}"
3593
+ },
3594
+ "font-variation-settings": {
3595
+ syntax: "normal | [ <string> <number> ]#"
3596
+ },
3597
+ "font-weight": {
3598
+ syntax: "<font-weight-absolute>{1,2}"
3599
+ },
3600
+ "line-gap-override": {
3601
+ syntax: "normal | <percentage>"
3602
+ },
3603
+ "size-adjust": {
3604
+ syntax: "<percentage>"
3605
+ },
3606
+ src: {
3607
+ syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"
3608
+ },
3609
+ "unicode-range": {
3610
+ syntax: "<unicode-range-token>#"
3611
+ }
3612
+ }
3489
3613
  },
3490
3614
  "@font-feature-values": {
3491
3615
  syntax: "@font-feature-values <family-name># {\n <feature-value-block-list>\n}"
3492
3616
  },
3493
3617
  "@font-palette-values": {
3494
- syntax: "@font-palette-values <dashed-ident> {\n <declaration-list>\n}"
3618
+ syntax: "@font-palette-values <dashed-ident> {\n <declaration-list>\n}",
3619
+ descriptors: {
3620
+ "base-palette": {
3621
+ syntax: "light | dark | <integer [0,∞]>"
3622
+ },
3623
+ "font-family": {
3624
+ syntax: "<family-name>#"
3625
+ },
3626
+ "override-colors": {
3627
+ syntax: "[ <integer [0,∞]> <color> ]#"
3628
+ }
3629
+ }
3495
3630
  },
3496
3631
  "@import": {
3497
3632
  syntax: "@import [ <string> | <url> ]\n [ layer | layer(<layer-name>) ]?\n [ supports( [ <supports-condition> | <declaration> ] ) ]?\n <media-query-list>? ;"
@@ -3509,13 +3644,38 @@ var atRules = {
3509
3644
  syntax: "@namespace <namespace-prefix>? [ <string> | <url> ];"
3510
3645
  },
3511
3646
  "@page": {
3512
- syntax: "@page <page-selector-list> {\n <page-body>\n}"
3647
+ syntax: "@page <page-selector-list> {\n <page-body>\n}",
3648
+ descriptors: {
3649
+ bleed: {
3650
+ syntax: "auto | <length>"
3651
+ },
3652
+ marks: {
3653
+ syntax: "none | [ crop || cross ]"
3654
+ },
3655
+ "page-orientation": {
3656
+ syntax: "upright | rotate-left | rotate-right "
3657
+ },
3658
+ size: {
3659
+ syntax: "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]"
3660
+ }
3661
+ }
3513
3662
  },
3514
3663
  "@position-try": {
3515
3664
  syntax: "@position-try <dashed-ident> {\n <declaration-list>\n}"
3516
3665
  },
3517
3666
  "@property": {
3518
- syntax: "@property <custom-property-name> {\n <declaration-list>\n}"
3667
+ syntax: "@property <custom-property-name> {\n <declaration-list>\n}",
3668
+ descriptors: {
3669
+ inherits: {
3670
+ syntax: "true | false"
3671
+ },
3672
+ "initial-value": {
3673
+ syntax: "<declaration-value>?"
3674
+ },
3675
+ syntax: {
3676
+ syntax: "<string>"
3677
+ }
3678
+ }
3519
3679
  },
3520
3680
  "@scope": {
3521
3681
  syntax: "@scope [(<scope-start>)]? [to (<scope-end>)]? {\n <rule-list>\n}"
@@ -3527,7 +3687,15 @@ var atRules = {
3527
3687
  syntax: "@supports <supports-condition> {\n <group-rule-body>\n}"
3528
3688
  },
3529
3689
  "@view-transition": {
3530
- syntax: "@view-transition {\n <declaration-list>\n}"
3690
+ syntax: "@view-transition {\n <declaration-list>\n}",
3691
+ descriptors: {
3692
+ navigation: {
3693
+ syntax: "auto | none"
3694
+ },
3695
+ types: {
3696
+ syntax: "none | <custom-ident>+"
3697
+ }
3698
+ }
3531
3699
  }
3532
3700
  };
3533
3701
  var config = {