@tbela99/css-parser 1.4.7 → 1.4.9
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.
- package/CHANGELOG.md +33 -2
- package/dist/index-umd-web.js +12953 -13248
- package/dist/index.cjs +10358 -10655
- package/dist/index.d.ts +820 -89
- package/dist/lib/ast/features/calc.js +3 -1
- package/dist/lib/ast/features/if.js +2 -96
- package/dist/lib/ast/features/prefix.js +7 -2
- package/dist/lib/ast/features/shorthand.js +1 -1
- package/dist/lib/ast/features/transform.js +1 -1
- package/dist/lib/ast/find.js +6 -6
- package/dist/lib/ast/math/expression.js +30 -12
- package/dist/lib/ast/minify.js +34 -5
- package/dist/lib/ast/transform/perspective.js +1 -1
- package/dist/lib/ast/transform/utils.js +29 -21
- package/dist/lib/ast/types.js +12 -0
- package/dist/lib/fs/resolve.js +2 -17
- package/dist/lib/parser/declaration/list.js +6 -1
- package/dist/lib/parser/linesmap.js +78 -0
- package/dist/lib/parser/parse.js +1264 -151
- package/dist/lib/parser/source.js +103 -0
- package/dist/lib/parser/tokenize.js +112 -133
- package/dist/lib/parser/utils/at-rule-container.js +12 -44
- package/dist/lib/parser/utils/at-rule-generic.js +12 -24
- package/dist/lib/parser/utils/at-rule-import.js +4 -172
- package/dist/lib/parser/utils/at-rule-media.js +27 -263
- package/dist/lib/parser/utils/at-rule-support.js +8 -258
- package/dist/lib/parser/utils/at-rule-when-else.js +4 -214
- package/dist/lib/parser/utils/declaration.js +5 -95
- package/dist/lib/parser/utils/hash.js +54 -1
- package/dist/lib/parser/utils/selector.js +1 -1
- package/dist/lib/parser/utils/token.js +1 -0
- package/dist/lib/renderer/render.js +79 -45
- package/dist/lib/renderer/sourcemap/sourcemap.js +47 -43
- package/dist/lib/syntax/color/cmyk.js +3 -3
- package/dist/lib/syntax/color/color-mix.js +15 -8
- package/dist/lib/syntax/color/color.js +19 -11
- package/dist/lib/syntax/color/hex.js +1 -1
- package/dist/lib/syntax/color/hsl.js +6 -6
- package/dist/lib/syntax/color/hwb.js +6 -6
- package/dist/lib/syntax/color/lab.js +5 -5
- package/dist/lib/syntax/color/lch.js +6 -6
- package/dist/lib/syntax/color/oklab.js +5 -5
- package/dist/lib/syntax/color/oklch.js +5 -5
- package/dist/lib/syntax/color/p3.js +9 -1
- package/dist/lib/syntax/color/{relativecolor.js → relative-color.js} +8 -1
- package/dist/lib/syntax/color/utils/distance.js +7 -2
- package/dist/lib/syntax/constants.js +5 -1
- package/dist/lib/syntax/syntax.js +12 -21
- package/dist/lib/validation/config.json.js +27 -6
- package/dist/lib/validation/match.js +42 -845
- package/dist/node.js +136 -11
- package/dist/web.js +135 -8
- package/llms.txt +73 -0
- package/package.json +14 -17
|
@@ -914,11 +914,14 @@ var declarations = {
|
|
|
914
914
|
"flex-grow": {
|
|
915
915
|
syntax: "<number>"
|
|
916
916
|
},
|
|
917
|
+
"flex-line-count": {
|
|
918
|
+
syntax: "<integer [1,∞]>"
|
|
919
|
+
},
|
|
917
920
|
"flex-shrink": {
|
|
918
921
|
syntax: "<number>"
|
|
919
922
|
},
|
|
920
923
|
"flex-wrap": {
|
|
921
|
-
syntax: "nowrap | wrap | wrap-reverse"
|
|
924
|
+
syntax: "nowrap | [ wrap | wrap-reverse ] || balance"
|
|
922
925
|
},
|
|
923
926
|
float: {
|
|
924
927
|
syntax: "left | right | none | inline-start | inline-end"
|
|
@@ -1184,6 +1187,9 @@ var declarations = {
|
|
|
1184
1187
|
"line-height-step": {
|
|
1185
1188
|
syntax: "<length>"
|
|
1186
1189
|
},
|
|
1190
|
+
"link-parameters": {
|
|
1191
|
+
syntax: "none | <param()>#"
|
|
1192
|
+
},
|
|
1187
1193
|
"list-style": {
|
|
1188
1194
|
syntax: "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>"
|
|
1189
1195
|
},
|
|
@@ -1481,6 +1487,9 @@ var declarations = {
|
|
|
1481
1487
|
"paint-order": {
|
|
1482
1488
|
syntax: "normal | [ fill || stroke || markers ]"
|
|
1483
1489
|
},
|
|
1490
|
+
"path-length": {
|
|
1491
|
+
syntax: "none | <length> [0,∞]"
|
|
1492
|
+
},
|
|
1484
1493
|
perspective: {
|
|
1485
1494
|
syntax: "none | <length>"
|
|
1486
1495
|
},
|
|
@@ -1776,7 +1785,7 @@ var declarations = {
|
|
|
1776
1785
|
syntax: "<color>"
|
|
1777
1786
|
},
|
|
1778
1787
|
"text-decoration-inset": {
|
|
1779
|
-
syntax: "<length>{1,2} | auto"
|
|
1788
|
+
syntax: "<length-percentage>{1,2} | auto"
|
|
1780
1789
|
},
|
|
1781
1790
|
"text-decoration-line": {
|
|
1782
1791
|
syntax: "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error"
|
|
@@ -2338,6 +2347,9 @@ var functions = {
|
|
|
2338
2347
|
"palette-mix": {
|
|
2339
2348
|
syntax: "palette-mix(<color-interpolation-method> , [ [normal | light | dark | <palette-identifier> | <palette-mix()> ] && <percentage [0,100]>? ]#{2})"
|
|
2340
2349
|
},
|
|
2350
|
+
param: {
|
|
2351
|
+
syntax: "mod( <dashed-ident>, <declaration-value>? )"
|
|
2352
|
+
},
|
|
2341
2353
|
path: {
|
|
2342
2354
|
syntax: "path( <'fill-rule'>? , <string> )"
|
|
2343
2355
|
},
|
|
@@ -2929,7 +2941,7 @@ var syntaxes = {
|
|
|
2929
2941
|
syntax: "[ historical-ligatures | no-historical-ligatures ]"
|
|
2930
2942
|
},
|
|
2931
2943
|
"hsl()": {
|
|
2932
|
-
syntax: "hsl( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsl( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? ) | hsl(from <color> [ <hue> | none | h | s | l ] <relative-hsl-component>{2} [ / [ <alpha-value> | none]
|
|
2944
|
+
syntax: "hsl( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsl( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? ) | hsl(from <color> [ <hue> | none | h | s | l ] <relative-hsl-component>{2} [ / [ <alpha-value> | none] ]? )"
|
|
2933
2945
|
},
|
|
2934
2946
|
"hsla()": {
|
|
2935
2947
|
syntax: "hsla( <hue>, <percentage>, <percentage>, <alpha-value>? ) | hsla( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? ) | hsla(from <color> < [ <hue> | none | h | s | l ] <relative-hsl-component>{2} [ / [ <alpha-value> | none ] ]? )"
|
|
@@ -2944,7 +2956,7 @@ var syntaxes = {
|
|
|
2944
2956
|
syntax: "hue-rotate( [ <angle> | <zero> ]? )"
|
|
2945
2957
|
},
|
|
2946
2958
|
"hwb()": {
|
|
2947
|
-
syntax: "hwb( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? ) | hwb(from <color> [ <hue> | none | h | w | b ] <relative-hwb-component>{2} [ / [ <alpha-value> | none]
|
|
2959
|
+
syntax: "hwb( [ <hue> | none ] [ <percentage> | <number> | none ] [ <percentage> | <number> | none ] [ / [ <alpha-value> | none ] ]? ) | hwb(from <color> [ <hue> | none | h | w | b ] <relative-hwb-component>{2} [ / [ <alpha-value> | none] ]? )"
|
|
2948
2960
|
},
|
|
2949
2961
|
"hypot()": {
|
|
2950
2962
|
syntax: "hypot( <calc-sum># )"
|
|
@@ -3319,7 +3331,7 @@ var syntaxes = {
|
|
|
3319
3331
|
syntax: "reversed( <counter-name> )"
|
|
3320
3332
|
},
|
|
3321
3333
|
"rgb()": {
|
|
3322
|
-
syntax: "rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? ) | rgb( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) | rgb(from <color> <relative-rgb-component>{3} [ / [ <alpha-value> | none]
|
|
3334
|
+
syntax: "rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? ) | rgb( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) | rgb(from <color> <relative-rgb-component>{3} [ / [ <alpha-value> | none] ]? )"
|
|
3323
3335
|
},
|
|
3324
3336
|
"rgba()": {
|
|
3325
3337
|
syntax: "rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? ) | rgba( [ <number> | <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) | rgba(from <color> <relative-rgb-component>{3} [ / [ <alpha-value> | none ] ]? )"
|
|
@@ -3888,8 +3900,17 @@ var syntaxes = {
|
|
|
3888
3900
|
"composes-selector": {
|
|
3889
3901
|
syntax: "<ident>+ [from [global&&<string>]]?"
|
|
3890
3902
|
},
|
|
3903
|
+
wcag2: {
|
|
3904
|
+
syntax: "wcag2 | wcag2([<number> | [ aa | aaa ] && large? ])"
|
|
3905
|
+
},
|
|
3906
|
+
"target-contrast": {
|
|
3907
|
+
syntax: "<wcag2>"
|
|
3908
|
+
},
|
|
3891
3909
|
"contrast-color()": {
|
|
3892
|
-
syntax: "contrast-color(<color> )"
|
|
3910
|
+
syntax: "contrast-color( [ [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>? ] | [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>, <color># ] ] )"
|
|
3911
|
+
},
|
|
3912
|
+
"color-layers()": {
|
|
3913
|
+
syntax: "color-layers([ <blend-mode>, ]? <color># )"
|
|
3893
3914
|
},
|
|
3894
3915
|
"font-feature-custom-ident": {
|
|
3895
3916
|
syntax: "<integer>"
|