@eslint/css-tree 3.6.9 → 4.0.0
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/LICENSE +1 -1
- package/README.md +2 -2
- package/cjs/definition-syntax/parse.cjs +63 -23
- package/cjs/generator/create.cjs +10 -2
- package/cjs/generator/token-before.cjs +9 -10
- package/cjs/lexer/generic.cjs +44 -1
- package/cjs/parser/create.cjs +37 -13
- package/data/patch.json +34 -1
- package/dist/csstree.esm.js +9 -9
- package/dist/csstree.js +9 -9
- package/dist/data.cjs +99 -41
- package/dist/data.js +99 -41
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/lib/definition-syntax/parse.js +63 -23
- package/lib/generator/create.js +10 -2
- package/lib/generator/token-before.js +9 -11
- package/lib/lexer/generic.js +32 -1
- package/lib/parser/create.js +37 -13
- package/package.json +8 -8
package/dist/data.js
CHANGED
|
@@ -105,13 +105,15 @@ export default {
|
|
|
105
105
|
"angular-color-stop": "<color> <color-stop-angle>?",
|
|
106
106
|
"angular-color-stop-list": "<angular-color-stop> , [<angular-color-hint>? , <angular-color-stop>]#?",
|
|
107
107
|
"animateable-feature": "scroll-position|contents|<custom-ident>",
|
|
108
|
+
"animation-action": "none|play|play-once|play-forwards|play-backwards|pause|reset|replay",
|
|
108
109
|
"asin()": "asin( <calc-sum> )",
|
|
109
110
|
"atan()": "atan( <calc-sum> )",
|
|
110
111
|
"atan2()": "atan2( <calc-sum> , <calc-sum> )",
|
|
111
112
|
"attachment": "scroll|fixed|local",
|
|
112
|
-
"attr()": "attr( <attr-name> <type
|
|
113
|
+
"attr()": "attr( <attr-name> <attr-type>? , <declaration-value>? )",
|
|
113
114
|
"attr-matcher": "['~'|'|'|'^'|'$'|'*']? '='",
|
|
114
115
|
"attr-modifier": "i|s",
|
|
116
|
+
"attr-type": "type( <syntax> )|raw-string|number|<attr-unit>",
|
|
115
117
|
"attribute-selector": "'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'",
|
|
116
118
|
"auto-repeat": "repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )",
|
|
117
119
|
"auto-track-list": "[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",
|
|
@@ -120,10 +122,10 @@ export default {
|
|
|
120
122
|
"basic-shape": "<inset()>|<xywh()>|<rect()>|<circle()>|<ellipse()>|<polygon()>|<path()>",
|
|
121
123
|
"basic-shape-rect": "<inset()>|<rect()>|<xywh()>",
|
|
122
124
|
"bg-clip": "<visual-box>|border-area|text",
|
|
123
|
-
"bg-image": "none
|
|
125
|
+
"bg-image": "<image>|none",
|
|
124
126
|
"bg-layer": "<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>",
|
|
125
127
|
"bg-position": "[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]",
|
|
126
|
-
"bg-size": "[<length-percentage>|auto]{1,2}|cover|contain",
|
|
128
|
+
"bg-size": "[<length-percentage [0,∞]>|auto]{1,2}|cover|contain",
|
|
127
129
|
"blend-mode": "normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",
|
|
128
130
|
"blur()": "blur( <length>? )",
|
|
129
131
|
"brightness()": "brightness( [<number>|<percentage>]? )",
|
|
@@ -153,7 +155,8 @@ export default {
|
|
|
153
155
|
"colorspace-params": "[<predefined-rgb-params>|<xyz-params>]",
|
|
154
156
|
"combinator": "'>'|'+'|'~'|['|' '|']",
|
|
155
157
|
"common-lig-values": "[common-ligatures|no-common-ligatures]",
|
|
156
|
-
"compat-auto": "searchfield|textarea|
|
|
158
|
+
"compat-auto": "searchfield|textarea|checkbox|radio|menulist|listbox|meter|progress-bar|button",
|
|
159
|
+
"compat-special": "textfield|menulist-button",
|
|
157
160
|
"complex-selector": "<complex-selector-unit> [<combinator>? <complex-selector-unit>]*",
|
|
158
161
|
"complex-selector-list": "<complex-selector>#",
|
|
159
162
|
"composite-style": "clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor",
|
|
@@ -172,6 +175,7 @@ export default {
|
|
|
172
175
|
"contextual-alt-values": "[contextual|no-contextual]",
|
|
173
176
|
"contrast()": "contrast( [<number>|<percentage>]? )",
|
|
174
177
|
"coord-box": "content-box|padding-box|border-box|fill-box|stroke-box|view-box",
|
|
178
|
+
"corner-shape-value": "round|scoop|bevel|notch|square|squircle|<superellipse()>",
|
|
175
179
|
"cos()": "cos( <calc-sum> )",
|
|
176
180
|
"counter": "<counter()>|<counters()>",
|
|
177
181
|
"counter()": "counter( <counter-name> , <counter-style>? )",
|
|
@@ -182,6 +186,7 @@ export default {
|
|
|
182
186
|
"cross-fade()": "cross-fade( <cf-mixing-image> , <cf-final-image>? )",
|
|
183
187
|
"cubic-bezier()": "cubic-bezier( [<number [0,1]> , <number>]#{2} )",
|
|
184
188
|
"cubic-bezier-easing-function": "ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )",
|
|
189
|
+
"cursor-predefined": "auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing",
|
|
185
190
|
"custom-color-space": "<dashed-ident>",
|
|
186
191
|
"custom-params": "<dashed-ident> [<number>|<percentage>|none]+",
|
|
187
192
|
"dasharray": "[[<length-percentage>|<number>]+]#",
|
|
@@ -195,6 +200,7 @@ export default {
|
|
|
195
200
|
"display-listitem": "<display-outside>?&&[flow|flow-root]?&&list-item",
|
|
196
201
|
"display-outside": "block|inline|run-in",
|
|
197
202
|
"drop-shadow()": "drop-shadow( [<color>?&&<length>{2,3}] )",
|
|
203
|
+
"dynamic-range-limit-mix()": "dynamic-range-limit-mix( [<'dynamic-range-limit'>&&<percentage [0,100]>]#{2,} )",
|
|
198
204
|
"easing-function": "<linear-easing-function>|<cubic-bezier-easing-function>|<step-easing-function>",
|
|
199
205
|
"east-asian-variant-values": "[jis78|jis83|jis90|jis04|simplified|traditional]",
|
|
200
206
|
"east-asian-width-values": "[full-width|proportional-width]",
|
|
@@ -213,7 +219,7 @@ export default {
|
|
|
213
219
|
"feature-value-name": "<custom-ident>",
|
|
214
220
|
"filter-function": "<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>",
|
|
215
221
|
"filter-value-list": "[<filter-function>|<url>]+",
|
|
216
|
-
"final-bg-layer": "<
|
|
222
|
+
"final-bg-layer": "<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>||<'background-color'>",
|
|
217
223
|
"fit-content()": "fit-content( <length-percentage [0,∞]> )",
|
|
218
224
|
"fixed-breadth": "<length-percentage>",
|
|
219
225
|
"fixed-repeat": "repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )",
|
|
@@ -335,7 +341,7 @@ export default {
|
|
|
335
341
|
"position": "[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]",
|
|
336
342
|
"position-area": "[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|center|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|center|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]",
|
|
337
343
|
"pow()": "pow( <calc-sum> , <calc-sum> )",
|
|
338
|
-
"predefined-rgb": "srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020",
|
|
344
|
+
"predefined-rgb": "srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020",
|
|
339
345
|
"predefined-rgb-params": "<predefined-rgb> [<number>|<percentage>|none]{3}",
|
|
340
346
|
"pseudo-class-selector": "':' <ident-token>|':' <function-token> <any-value> ')'",
|
|
341
347
|
"pseudo-element-selector": "':' <pseudo-class-selector>|<legacy-pseudo-element-selector>",
|
|
@@ -351,7 +357,7 @@ export default {
|
|
|
351
357
|
"ray()": "ray( <angle>&&<ray-size>?&&contain?&&[at <position>]? )",
|
|
352
358
|
"ray-size": "closest-side|closest-corner|farthest-side|farthest-corner|sides",
|
|
353
359
|
"rect()": "rect( [<length-percentage>|auto]{4} [round <'border-radius'>]? )",
|
|
354
|
-
"rectangular-color-space": "srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65",
|
|
360
|
+
"rectangular-color-space": "srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65",
|
|
355
361
|
"relative-selector": "<combinator>? <complex-selector>",
|
|
356
362
|
"relative-selector-list": "<relative-selector>#",
|
|
357
363
|
"relative-size": "larger|smaller",
|
|
@@ -417,6 +423,7 @@ export default {
|
|
|
417
423
|
"style-in-parens": "( <style-condition> )|( <style-feature> )|<general-enclosed>",
|
|
418
424
|
"style-query": "<style-condition>|<style-feature>",
|
|
419
425
|
"subclass-selector": "<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>",
|
|
426
|
+
"superellipse()": "superellipse( [<number>|infinity|-infinity] )",
|
|
420
427
|
"supports-condition": "not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*",
|
|
421
428
|
"supports-decl": "( <declaration> )",
|
|
422
429
|
"supports-feature": "<supports-decl>|<supports-selector-fn>",
|
|
@@ -486,6 +493,7 @@ export default {
|
|
|
486
493
|
"age": "child|young|old",
|
|
487
494
|
"attr-name": "<wq-name>",
|
|
488
495
|
"attr-fallback": "<any-value>",
|
|
496
|
+
"autospace": "no-autospace|[ideograph-alpha||ideograph-numeric||punctuation]||[insert|replace]",
|
|
489
497
|
"bottom": "<length>|auto",
|
|
490
498
|
"generic-voice": "[<age>? <gender> <integer>?]",
|
|
491
499
|
"gender": "male|female|neutral",
|
|
@@ -548,7 +556,14 @@ export default {
|
|
|
548
556
|
"xyz-space": "xyz|xyz-d50|xyz-d65",
|
|
549
557
|
"style-condition": "not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]",
|
|
550
558
|
"-non-standard-display": "-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box",
|
|
551
|
-
"inset-area": "[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]"
|
|
559
|
+
"inset-area": "[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]",
|
|
560
|
+
"syntax": "'*'|<syntax-component> [<syntax-combinator> <syntax-component>]*|<syntax-string>",
|
|
561
|
+
"syntax-component": "<syntax-single-component> <syntax-multiplier>?|'<' transform-list '>'",
|
|
562
|
+
"syntax-single-component": "'<' <syntax-type-name> '>'|<ident>",
|
|
563
|
+
"syntax-type-name": "angle|color|custom-ident|image|integer|length|length-percentage|number|percentage|resolution|string|time|url|transform-function",
|
|
564
|
+
"syntax-combinator": "'|'",
|
|
565
|
+
"syntax-multiplier": "'#'|'+'",
|
|
566
|
+
"syntax-string": "<string>"
|
|
552
567
|
},
|
|
553
568
|
"properties": {
|
|
554
569
|
"--*": "<declaration-value>",
|
|
@@ -653,8 +668,8 @@ export default {
|
|
|
653
668
|
"-webkit-user-select": "auto|none|text|all",
|
|
654
669
|
"accent-color": "auto|<color>",
|
|
655
670
|
"align-content": "normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>",
|
|
656
|
-
"align-items": "normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]",
|
|
657
|
-
"align-self": "auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position
|
|
671
|
+
"align-items": "normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]|anchor-center",
|
|
672
|
+
"align-self": "auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>|anchor-center",
|
|
658
673
|
"align-tracks": "[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",
|
|
659
674
|
"alignment-baseline": "auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical",
|
|
660
675
|
"all": "initial|inherit|unset|revert|revert-layer",
|
|
@@ -674,11 +689,12 @@ export default {
|
|
|
674
689
|
"animation-range-start": "[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#",
|
|
675
690
|
"animation-timeline": "<single-animation-timeline>#",
|
|
676
691
|
"animation-timing-function": "<easing-function>#",
|
|
677
|
-
"
|
|
692
|
+
"animation-trigger": "[none|[<dashed-ident> <animation-action>+]+]#",
|
|
693
|
+
"appearance": "none|auto|<compat-auto>|<compat-special>",
|
|
678
694
|
"aspect-ratio": "auto||<ratio>",
|
|
679
695
|
"backdrop-filter": "none|<filter-value-list>",
|
|
680
696
|
"backface-visibility": "visible|hidden",
|
|
681
|
-
"background": "
|
|
697
|
+
"background": "<bg-layer>#? , <final-bg-layer>",
|
|
682
698
|
"background-attachment": "<attachment>#",
|
|
683
699
|
"background-blend-mode": "<blend-mode>#",
|
|
684
700
|
"background-clip": "<bg-clip>#",
|
|
@@ -691,6 +707,7 @@ export default {
|
|
|
691
707
|
"background-repeat": "<repeat-style>#",
|
|
692
708
|
"background-size": "<bg-size>#",
|
|
693
709
|
"baseline-shift": "baseline|sub|super|<svg-length>",
|
|
710
|
+
"baseline-source": "auto|first|last",
|
|
694
711
|
"block-size": "<'width'>",
|
|
695
712
|
"border": "<line-width>||<line-style>||<color>",
|
|
696
713
|
"border-block": "<'border-block-start'>",
|
|
@@ -707,20 +724,20 @@ export default {
|
|
|
707
724
|
"border-block-width": "<'border-top-width'>{1,2}",
|
|
708
725
|
"border-bottom": "<line-width>||<line-style>||<color>",
|
|
709
726
|
"border-bottom-color": "<'border-top-color'>",
|
|
710
|
-
"border-bottom-left-radius": "<length-percentage>{1,2}",
|
|
711
|
-
"border-bottom-right-radius": "<length-percentage>{1,2}",
|
|
727
|
+
"border-bottom-left-radius": "<length-percentage [0,∞]>{1,2}",
|
|
728
|
+
"border-bottom-right-radius": "<length-percentage [0,∞]>{1,2}",
|
|
712
729
|
"border-bottom-style": "<line-style>",
|
|
713
730
|
"border-bottom-width": "<line-width>",
|
|
714
|
-
"border-collapse": "collapse
|
|
731
|
+
"border-collapse": "separate|collapse",
|
|
715
732
|
"border-color": "<color>{1,4}",
|
|
716
733
|
"border-end-end-radius": "<'border-top-left-radius'>",
|
|
717
734
|
"border-end-start-radius": "<'border-top-left-radius'>",
|
|
718
735
|
"border-image": "<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>",
|
|
719
|
-
"border-image-outset": "[<length>|<number>]{1,4}",
|
|
736
|
+
"border-image-outset": "[<length [0,∞]>|<number [0,∞]>]{1,4}",
|
|
720
737
|
"border-image-repeat": "[stretch|repeat|round|space]{1,2}",
|
|
721
|
-
"border-image-slice": "<number
|
|
738
|
+
"border-image-slice": "[<number [0,∞]>|<percentage [0,∞]>]{1,4}&&fill?",
|
|
722
739
|
"border-image-source": "none|<image>",
|
|
723
|
-
"border-image-width": "[<length-percentage>|<number>|auto]{1,4}",
|
|
740
|
+
"border-image-width": "[<length-percentage [0,∞]>|<number [0,∞]>|auto]{1,4}",
|
|
724
741
|
"border-inline": "<'border-block-start'>",
|
|
725
742
|
"border-inline-color": "<'border-top-color'>{1,2}",
|
|
726
743
|
"border-inline-end": "<'border-top-width'>||<'border-top-style'>||<color>",
|
|
@@ -737,23 +754,23 @@ export default {
|
|
|
737
754
|
"border-left-color": "<color>",
|
|
738
755
|
"border-left-style": "<line-style>",
|
|
739
756
|
"border-left-width": "<line-width>",
|
|
740
|
-
"border-radius": "<length-percentage>{1,4} [/ <length-percentage>{1,4}]?",
|
|
757
|
+
"border-radius": "<length-percentage [0,∞]>{1,4} [/ <length-percentage [0,∞]>{1,4}]?",
|
|
741
758
|
"border-right": "<line-width>||<line-style>||<color>",
|
|
742
759
|
"border-right-color": "<color>",
|
|
743
760
|
"border-right-style": "<line-style>",
|
|
744
761
|
"border-right-width": "<line-width>",
|
|
745
|
-
"border-spacing": "<length>
|
|
762
|
+
"border-spacing": "<length>{1,2}",
|
|
746
763
|
"border-start-end-radius": "<'border-top-left-radius'>",
|
|
747
764
|
"border-start-start-radius": "<'border-top-left-radius'>",
|
|
748
765
|
"border-style": "<line-style>{1,4}",
|
|
749
766
|
"border-top": "<line-width>||<line-style>||<color>",
|
|
750
767
|
"border-top-color": "<color>",
|
|
751
|
-
"border-top-left-radius": "<length-percentage>{1,2}",
|
|
752
|
-
"border-top-right-radius": "<length-percentage>{1,2}",
|
|
768
|
+
"border-top-left-radius": "<length-percentage [0,∞]>{1,2}",
|
|
769
|
+
"border-top-right-radius": "<length-percentage [0,∞]>{1,2}",
|
|
753
770
|
"border-top-style": "<line-style>",
|
|
754
771
|
"border-top-width": "<line-width>",
|
|
755
772
|
"border-width": "<line-width>{1,4}",
|
|
756
|
-
"bottom": "
|
|
773
|
+
"bottom": "auto|<length-percentage>|<anchor()>|<anchor-size()>",
|
|
757
774
|
"box-align": "start|center|end|baseline|stretch",
|
|
758
775
|
"box-decoration-break": "slice|clone",
|
|
759
776
|
"box-direction": "normal|reverse|inherit",
|
|
@@ -769,7 +786,8 @@ export default {
|
|
|
769
786
|
"break-before": "auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region",
|
|
770
787
|
"break-inside": "auto|avoid|avoid-page|avoid-column|avoid-region",
|
|
771
788
|
"caption-side": "top|bottom",
|
|
772
|
-
"caret": "<'caret-color'>||<'caret-shape'>",
|
|
789
|
+
"caret": "<'caret-color'>||<'caret-animation'>||<'caret-shape'>",
|
|
790
|
+
"caret-animation": "auto|manual",
|
|
773
791
|
"caret-color": "auto|<color>",
|
|
774
792
|
"caret-shape": "auto|bar|block|underscore",
|
|
775
793
|
"clear": "none|left|right|both|inline-start|inline-end",
|
|
@@ -782,13 +800,15 @@ export default {
|
|
|
782
800
|
"column-count": "<integer>|auto",
|
|
783
801
|
"column-fill": "auto|balance",
|
|
784
802
|
"column-gap": "normal|<length-percentage>",
|
|
803
|
+
"column-height": "auto|<length [0,∞]>",
|
|
785
804
|
"column-rule": "<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>",
|
|
786
805
|
"column-rule-color": "<color>",
|
|
787
806
|
"column-rule-style": "<'border-style'>",
|
|
788
807
|
"column-rule-width": "<'border-width'>",
|
|
789
808
|
"column-span": "none|all",
|
|
790
|
-
"column-width": "
|
|
791
|
-
"
|
|
809
|
+
"column-width": "auto|<length [0,∞]>",
|
|
810
|
+
"column-wrap": "auto|nowrap|wrap",
|
|
811
|
+
"columns": "[<'column-width'>||<'column-count'>] [/ <'column-height'>]?",
|
|
792
812
|
"contain": "none|strict|content|[[size||inline-size]||layout||style||paint]",
|
|
793
813
|
"contain-intrinsic-block-size": "auto? [none|<length>]",
|
|
794
814
|
"contain-intrinsic-height": "auto? [none|<length>]",
|
|
@@ -798,8 +818,25 @@ export default {
|
|
|
798
818
|
"container": "<'container-name'> [/ <'container-type'>]?",
|
|
799
819
|
"container-name": "none|<custom-ident>+",
|
|
800
820
|
"container-type": "normal||[size|inline-size]",
|
|
801
|
-
"content": "normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?",
|
|
821
|
+
"content": "normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>|<attr()>]+]?",
|
|
802
822
|
"content-visibility": "visible|auto|hidden",
|
|
823
|
+
"corner-block-end-shape": "<corner-shape-value>{1,2}",
|
|
824
|
+
"corner-block-start-shape": "<corner-shape-value>{1,2}",
|
|
825
|
+
"corner-bottom-shape": "<corner-shape-value>{1,2}",
|
|
826
|
+
"corner-bottom-left-shape": "<corner-shape-value>",
|
|
827
|
+
"corner-bottom-right-shape": "<corner-shape-value>",
|
|
828
|
+
"corner-end-end-shape": "<corner-shape-value>",
|
|
829
|
+
"corner-end-start-shape": "<corner-shape-value>",
|
|
830
|
+
"corner-inline-end-shape": "<corner-shape-value>{1,2}",
|
|
831
|
+
"corner-inline-start-shape": "<corner-shape-value>{1,2}",
|
|
832
|
+
"corner-left-shape": "<corner-shape-value>{1,2}",
|
|
833
|
+
"corner-right-shape": "<corner-shape-value>{1,2}",
|
|
834
|
+
"corner-shape": "<corner-shape-value>{1,4}",
|
|
835
|
+
"corner-start-start-shape": "<corner-shape-value>",
|
|
836
|
+
"corner-start-end-shape": "<corner-shape-value>",
|
|
837
|
+
"corner-top-shape": "<corner-shape-value>{1,2}",
|
|
838
|
+
"corner-top-left-shape": "<corner-shape-value>",
|
|
839
|
+
"corner-top-right-shape": "<corner-shape-value>",
|
|
803
840
|
"counter-increment": "[<counter-name> <integer>?]+|none",
|
|
804
841
|
"counter-reset": "[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none",
|
|
805
842
|
"counter-set": "[<counter-name> <integer>?]+|none",
|
|
@@ -810,10 +847,11 @@ export default {
|
|
|
810
847
|
"direction": "ltr|rtl",
|
|
811
848
|
"display": "[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>",
|
|
812
849
|
"dominant-baseline": "auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",
|
|
850
|
+
"dynamic-range-limit": "standard|no-limit|constrained|<dynamic-range-limit-mix()>",
|
|
813
851
|
"empty-cells": "show|hide",
|
|
814
852
|
"field-sizing": "content|fixed",
|
|
815
853
|
"fill": "<paint>",
|
|
816
|
-
"fill-opacity": "<number-zero-one>",
|
|
854
|
+
"fill-opacity": "<number-zero-one>|<percentage>",
|
|
817
855
|
"fill-rule": "nonzero|evenodd",
|
|
818
856
|
"filter": "none|<filter-value-list>|<-ms-filter-function-list>",
|
|
819
857
|
"flex": "none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]",
|
|
@@ -895,11 +933,15 @@ export default {
|
|
|
895
933
|
"inset-inline-start": "<'top'>",
|
|
896
934
|
"interpolate-size": "numeric-only|allow-keywords",
|
|
897
935
|
"isolation": "auto|isolate",
|
|
936
|
+
"interactivity": "auto|inert",
|
|
937
|
+
"interest-delay": "<'interest-delay-start'>{1,2}",
|
|
938
|
+
"interest-delay-end": "normal|<time>",
|
|
939
|
+
"interest-delay-start": "normal|<time>",
|
|
898
940
|
"justify-content": "normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]",
|
|
899
|
-
"justify-items": "normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]",
|
|
900
|
-
"justify-self": "auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]",
|
|
941
|
+
"justify-items": "normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]|anchor-center",
|
|
942
|
+
"justify-self": "auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|anchor-center",
|
|
901
943
|
"justify-tracks": "[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",
|
|
902
|
-
"left": "
|
|
944
|
+
"left": "auto|<length-percentage>|<anchor()>|<anchor-size()>",
|
|
903
945
|
"letter-spacing": "normal|<length-percentage>",
|
|
904
946
|
"lighting-color": "<color>",
|
|
905
947
|
"line-break": "auto|loose|normal|strict|anywhere",
|
|
@@ -914,13 +956,13 @@ export default {
|
|
|
914
956
|
"margin-block": "<'margin-top'>{1,2}",
|
|
915
957
|
"margin-block-end": "<'margin-top'>",
|
|
916
958
|
"margin-block-start": "<'margin-top'>",
|
|
917
|
-
"margin-bottom": "<length-percentage>|auto",
|
|
959
|
+
"margin-bottom": "<length-percentage>|auto|<anchor-size()>",
|
|
918
960
|
"margin-inline": "<'margin-top'>{1,2}",
|
|
919
961
|
"margin-inline-end": "<'margin-top'>",
|
|
920
962
|
"margin-inline-start": "<'margin-top'>",
|
|
921
|
-
"margin-left": "<length-percentage>|auto",
|
|
922
|
-
"margin-right": "<length-percentage>|auto",
|
|
923
|
-
"margin-top": "<length-percentage>|auto",
|
|
963
|
+
"margin-left": "<length-percentage>|auto|<anchor-size()>",
|
|
964
|
+
"margin-right": "<length-percentage>|auto|<anchor-size()>",
|
|
965
|
+
"margin-top": "<length-percentage>|auto|<anchor-size()>",
|
|
924
966
|
"margin-trim": "none|in-flow|all",
|
|
925
967
|
"marker": "none|<url>",
|
|
926
968
|
"marker-end": "none|<url>",
|
|
@@ -956,7 +998,7 @@ export default {
|
|
|
956
998
|
"min-height": "auto|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>",
|
|
957
999
|
"min-inline-size": "<'min-width'>",
|
|
958
1000
|
"min-width": "auto|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>",
|
|
959
|
-
"mix-blend-mode": "<blend-mode>|plus-lighter",
|
|
1001
|
+
"mix-blend-mode": "<blend-mode>|plus-darker|plus-lighter",
|
|
960
1002
|
"object-fit": "fill|contain|cover|none|scale-down",
|
|
961
1003
|
"object-position": "<position>",
|
|
962
1004
|
"object-view-box": "none|<basic-shape-rect>",
|
|
@@ -976,10 +1018,10 @@ export default {
|
|
|
976
1018
|
"outline-width": "<line-width>",
|
|
977
1019
|
"overflow": "[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>",
|
|
978
1020
|
"overflow-anchor": "auto|none",
|
|
979
|
-
"overflow-block": "visible|hidden|clip|scroll|auto",
|
|
1021
|
+
"overflow-block": "visible|hidden|clip|scroll|auto|<-non-standard-overflow>",
|
|
980
1022
|
"overflow-clip-box": "padding-box|content-box",
|
|
981
1023
|
"overflow-clip-margin": "<visual-box>||<length [0,∞]>",
|
|
982
|
-
"overflow-inline": "visible|hidden|clip|scroll|auto",
|
|
1024
|
+
"overflow-inline": "visible|hidden|clip|scroll|auto|<-non-standard-overflow>",
|
|
983
1025
|
"overflow-wrap": "normal|break-word|anywhere",
|
|
984
1026
|
"overflow-x": "visible|hidden|clip|scroll|auto|<-non-standard-overflow>",
|
|
985
1027
|
"overflow-y": "visible|hidden|clip|scroll|auto|<-non-standard-overflow>",
|
|
@@ -1012,7 +1054,7 @@ export default {
|
|
|
1012
1054
|
"place-self": "<'align-self'> <'justify-self'>?",
|
|
1013
1055
|
"pointer-events": "auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",
|
|
1014
1056
|
"position": "static|relative|absolute|sticky|fixed|-webkit-sticky",
|
|
1015
|
-
"position-anchor": "auto|<anchor-name>",
|
|
1057
|
+
"position-anchor": "auto|none|<anchor-name>",
|
|
1016
1058
|
"position-area": "none|<position-area>",
|
|
1017
1059
|
"position-try": "<'position-try-order'>? <'position-try-fallbacks'>",
|
|
1018
1060
|
"position-try-fallbacks": "none|[[<dashed-ident>||<try-tactic>]|<'position-area'>]#",
|
|
@@ -1021,8 +1063,10 @@ export default {
|
|
|
1021
1063
|
"print-color-adjust": "economy|exact",
|
|
1022
1064
|
"quotes": "none|auto|[<string> <string>]+",
|
|
1023
1065
|
"r": "<length>|<percentage>",
|
|
1066
|
+
"reading-flow": "normal|source-order|flex-visual|flex-flow|grid-rows|grid-columns|grid-order",
|
|
1067
|
+
"reading-order": "<integer>",
|
|
1024
1068
|
"resize": "none|both|horizontal|vertical|block|inline",
|
|
1025
|
-
"right": "
|
|
1069
|
+
"right": "auto|<length-percentage>|<anchor()>|<anchor-size()>",
|
|
1026
1070
|
"rotate": "none|<angle>|[x|y|z|<number>{3}]&&<angle>",
|
|
1027
1071
|
"row-gap": "normal|<length-percentage>",
|
|
1028
1072
|
"ruby-align": "start|center|space-between|space-around",
|
|
@@ -1045,6 +1089,7 @@ export default {
|
|
|
1045
1089
|
"scroll-margin-left": "<length>",
|
|
1046
1090
|
"scroll-margin-right": "<length>",
|
|
1047
1091
|
"scroll-margin-top": "<length>",
|
|
1092
|
+
"scroll-marker-group": "none|before|after",
|
|
1048
1093
|
"scroll-padding": "[auto|<length-percentage>]{1,4}",
|
|
1049
1094
|
"scroll-padding-block": "[auto|<length-percentage>]{1,2}",
|
|
1050
1095
|
"scroll-padding-block-end": "auto|<length-percentage>",
|
|
@@ -1065,6 +1110,7 @@ export default {
|
|
|
1065
1110
|
"scroll-snap-type": "none|[x|y|block|inline|both] [mandatory|proximity]?",
|
|
1066
1111
|
"scroll-snap-type-x": "none|mandatory|proximity",
|
|
1067
1112
|
"scroll-snap-type-y": "none|mandatory|proximity",
|
|
1113
|
+
"scroll-target-group": "none|auto",
|
|
1068
1114
|
"scroll-timeline": "[<'scroll-timeline-name'> <'scroll-timeline-axis'>?]#",
|
|
1069
1115
|
"scroll-timeline-axis": "[block|inline|x|y]#",
|
|
1070
1116
|
"scroll-timeline-name": "[none|<dashed-ident>]#",
|
|
@@ -1092,12 +1138,14 @@ export default {
|
|
|
1092
1138
|
"text-align": "start|end|left|right|center|justify|match-parent",
|
|
1093
1139
|
"text-align-last": "auto|start|end|left|right|center|justify",
|
|
1094
1140
|
"text-anchor": "start|middle|end",
|
|
1141
|
+
"text-autospace": "normal|<autospace>|auto",
|
|
1095
1142
|
"text-box": "normal|<'text-box-trim'>||<'text-box-edge'>",
|
|
1096
1143
|
"text-box-edge": "auto|<text-edge>",
|
|
1097
1144
|
"text-box-trim": "none|trim-start|trim-end|trim-both",
|
|
1098
1145
|
"text-combine-upright": "none|all|[digits <integer>?]",
|
|
1099
1146
|
"text-decoration": "<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>",
|
|
1100
1147
|
"text-decoration-color": "<color>",
|
|
1148
|
+
"text-decoration-inset": "<length>{1,2}|auto",
|
|
1101
1149
|
"text-decoration-line": "none|[underline||overline||line-through||blink]|spelling-error|grammar-error",
|
|
1102
1150
|
"text-decoration-skip": "none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]",
|
|
1103
1151
|
"text-decoration-skip-ink": "auto|all|none",
|
|
@@ -1122,7 +1170,16 @@ export default {
|
|
|
1122
1170
|
"text-wrap-mode": "wrap|nowrap",
|
|
1123
1171
|
"text-wrap-style": "auto|balance|stable|pretty",
|
|
1124
1172
|
"timeline-scope": "none|<dashed-ident>#",
|
|
1125
|
-
"
|
|
1173
|
+
"timeline-trigger": "none|[<'timeline-trigger-name'> <'timeline-trigger-source'> <'timeline-trigger-range'> ['/' <'timeline-trigger-exit-range'>]?]#",
|
|
1174
|
+
"timeline-trigger-name": "none|<dashed-ident>#",
|
|
1175
|
+
"timeline-trigger-exit-range": "[<'timeline-trigger-exit-range-start'> <'timeline-trigger-exit-range-end'>?]#",
|
|
1176
|
+
"timeline-trigger-exit-range-end": "[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#",
|
|
1177
|
+
"timeline-trigger-exit-range-start": "[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#",
|
|
1178
|
+
"timeline-trigger-range": "[<'timeline-trigger-range-start'> <'timeline-trigger-range-end'>?]#",
|
|
1179
|
+
"timeline-trigger-range-end": "[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#",
|
|
1180
|
+
"timeline-trigger-range-start": "[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#",
|
|
1181
|
+
"timeline-trigger-source": "<single-animation-timeline>#",
|
|
1182
|
+
"top": "auto|<length-percentage>|<anchor()>|<anchor-size()>",
|
|
1126
1183
|
"touch-action": "auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",
|
|
1127
1184
|
"transform": "none|<transform-list>",
|
|
1128
1185
|
"transform-box": "content-box|border-box|fill-box|stroke-box|view-box",
|
|
@@ -1135,6 +1192,7 @@ export default {
|
|
|
1135
1192
|
"transition-property": "none|<single-transition-property>#",
|
|
1136
1193
|
"transition-timing-function": "<easing-function>#",
|
|
1137
1194
|
"translate": "none|<length-percentage> [<length-percentage> <length>?]?",
|
|
1195
|
+
"trigger-scope": "none|all|<dashed-ident>#",
|
|
1138
1196
|
"unicode-bidi": "normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext",
|
|
1139
1197
|
"user-select": "auto|text|none|all",
|
|
1140
1198
|
"vector-effect": "none|non-scaling-stroke|non-scaling-size|non-rotation|fixed-position",
|
package/dist/version.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = "
|
|
1
|
+
module.exports = "4.0.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "
|
|
1
|
+
export const version = "4.0.0";
|
|
@@ -160,6 +160,16 @@ function maybeMultiplied(scanner, node) {
|
|
|
160
160
|
return maybeMultiplied(scanner, multiplier);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
// https://www.w3.org/TR/css-values-4/#component-multipliers
|
|
164
|
+
// > the # and ? multipliers, {A} and ? multipliers, and {A,B} and ? multipliers
|
|
165
|
+
// > may be stacked as #?, {A}?, and {A,B}?, respectively
|
|
166
|
+
// Represent "{}?" as nested multipliers as well as "+#".
|
|
167
|
+
// The "#?" case is already handled above, in maybeMultiplied()
|
|
168
|
+
if (scanner.charCode() === QUESTIONMARK &&
|
|
169
|
+
scanner.charCodeAt(scanner.pos - 1) === RIGHTCURLYBRACKET) {
|
|
170
|
+
return maybeMultiplied(scanner, multiplier);
|
|
171
|
+
}
|
|
172
|
+
|
|
163
173
|
return multiplier;
|
|
164
174
|
}
|
|
165
175
|
|
|
@@ -376,35 +386,65 @@ function regroupTerms(terms, combinators) {
|
|
|
376
386
|
return combinator;
|
|
377
387
|
}
|
|
378
388
|
|
|
379
|
-
function readImplicitGroup(scanner, stopCharCode) {
|
|
389
|
+
function readImplicitGroup(scanner, stopCharCode = -1) {
|
|
380
390
|
const combinators = Object.create(null);
|
|
381
391
|
const terms = [];
|
|
382
|
-
let token;
|
|
383
392
|
let prevToken = null;
|
|
384
393
|
let prevTokenPos = scanner.pos;
|
|
394
|
+
let prevTokenIsFunction = false;
|
|
395
|
+
|
|
396
|
+
while (scanner.charCode() !== stopCharCode) {
|
|
397
|
+
let token = prevTokenIsFunction
|
|
398
|
+
? readImplicitGroup(scanner, RIGHTPARENTHESIS)
|
|
399
|
+
: peek(scanner);
|
|
400
|
+
|
|
401
|
+
if (!token) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
if (token.type === 'Spaces') {
|
|
406
|
+
continue;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (prevTokenIsFunction) {
|
|
410
|
+
if (token.terms.length === 0) {
|
|
411
|
+
prevTokenIsFunction = false;
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
385
414
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
415
|
+
if (token.combinator === ' ') {
|
|
416
|
+
while (token.terms.length > 1) {
|
|
417
|
+
combinators[' '] = true; // a b
|
|
418
|
+
terms.push({
|
|
419
|
+
type: 'Combinator',
|
|
420
|
+
value: ' '
|
|
421
|
+
}, token.terms.shift());
|
|
393
422
|
}
|
|
394
423
|
|
|
395
|
-
|
|
396
|
-
} else if (prevToken !== null && prevToken.type !== 'Combinator') {
|
|
397
|
-
combinators[' '] = true; // a b
|
|
398
|
-
terms.push({
|
|
399
|
-
type: 'Combinator',
|
|
400
|
-
value: ' '
|
|
401
|
-
});
|
|
424
|
+
token = token.terms[0];
|
|
402
425
|
}
|
|
426
|
+
}
|
|
403
427
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
428
|
+
if (token.type === 'Combinator') {
|
|
429
|
+
// check for combinator in group beginning and double combinator sequence
|
|
430
|
+
if (prevToken === null || prevToken.type === 'Combinator') {
|
|
431
|
+
scanner.pos = prevTokenPos;
|
|
432
|
+
scanner.error('Unexpected combinator');
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
combinators[token.value] = true;
|
|
436
|
+
} else if (prevToken !== null && prevToken.type !== 'Combinator') {
|
|
437
|
+
combinators[' '] = true; // a b
|
|
438
|
+
terms.push({
|
|
439
|
+
type: 'Combinator',
|
|
440
|
+
value: ' '
|
|
441
|
+
});
|
|
407
442
|
}
|
|
443
|
+
|
|
444
|
+
terms.push(token);
|
|
445
|
+
prevToken = token;
|
|
446
|
+
prevTokenPos = scanner.pos;
|
|
447
|
+
prevTokenIsFunction = token.type === 'Function';
|
|
408
448
|
}
|
|
409
449
|
|
|
410
450
|
// check for combinator in group ending
|
|
@@ -422,11 +462,11 @@ function readImplicitGroup(scanner, stopCharCode) {
|
|
|
422
462
|
};
|
|
423
463
|
}
|
|
424
464
|
|
|
425
|
-
function readGroup(scanner
|
|
465
|
+
function readGroup(scanner) {
|
|
426
466
|
let result;
|
|
427
467
|
|
|
428
468
|
scanner.eat(LEFTSQUAREBRACKET);
|
|
429
|
-
result = readImplicitGroup(scanner,
|
|
469
|
+
result = readImplicitGroup(scanner, RIGHTSQUAREBRACKET);
|
|
430
470
|
scanner.eat(RIGHTSQUAREBRACKET);
|
|
431
471
|
|
|
432
472
|
result.explicit = true;
|
|
@@ -439,7 +479,7 @@ function readGroup(scanner, stopCharCode) {
|
|
|
439
479
|
return result;
|
|
440
480
|
}
|
|
441
481
|
|
|
442
|
-
function peek(scanner
|
|
482
|
+
function peek(scanner) {
|
|
443
483
|
let code = scanner.charCode();
|
|
444
484
|
|
|
445
485
|
switch (code) {
|
|
@@ -448,7 +488,7 @@ function peek(scanner, stopCharCode) {
|
|
|
448
488
|
break;
|
|
449
489
|
|
|
450
490
|
case LEFTSQUAREBRACKET:
|
|
451
|
-
return maybeMultiplied(scanner, readGroup(scanner
|
|
491
|
+
return maybeMultiplied(scanner, readGroup(scanner));
|
|
452
492
|
|
|
453
493
|
case LESSTHANSIGN:
|
|
454
494
|
return scanner.nextCharCode() === APOSTROPHE
|
package/lib/generator/create.js
CHANGED
|
@@ -47,9 +47,13 @@ export function createGenerator(config) {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
tokenBefore: tokenBefore.safe,
|
|
50
|
-
token(type, value) {
|
|
50
|
+
token(type, value, suppressAutoWhiteSpace) {
|
|
51
51
|
prevCode = this.tokenBefore(prevCode, type, value);
|
|
52
52
|
|
|
53
|
+
if (!suppressAutoWhiteSpace && prevCode & 1) {
|
|
54
|
+
this.emit(' ', WhiteSpace, true);
|
|
55
|
+
}
|
|
56
|
+
|
|
53
57
|
this.emit(value, type, false);
|
|
54
58
|
|
|
55
59
|
if (type === Delim && value.charCodeAt(0) === REVERSESOLIDUS) {
|
|
@@ -86,7 +90,11 @@ export function createGenerator(config) {
|
|
|
86
90
|
const tokenize = getTokenizer(config);
|
|
87
91
|
|
|
88
92
|
return tokenize(chunk, (type, start, end) => {
|
|
89
|
-
|
|
93
|
+
handlers.token(
|
|
94
|
+
type,
|
|
95
|
+
chunk.slice(start, end),
|
|
96
|
+
start !== 0 // suppress auto whitespace for internal value tokens
|
|
97
|
+
);
|
|
90
98
|
});
|
|
91
99
|
}
|
|
92
100
|
};
|