@tbela99/css-parser 2.1.0 → 2.2.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/CHANGELOG.md +42 -1
- package/README.md +14 -7
- package/architecture.png +0 -0
- package/dist/{src/data → data}/properties.json.js +86 -2
- package/dist/{src/data → data}/validation.json.js +5 -2
- package/dist/index-umd-web.js +10738 -4359
- package/dist/index.d.ts +734 -100
- package/dist/{src/lib → lib}/ast/arena-node.js +10 -10
- package/dist/{src/lib → lib}/ast/arena.js +304 -139
- package/dist/{src/lib → lib}/ast/cache.js +2 -2
- package/dist/{src/lib → lib}/ast/features/calc.js +11 -9
- package/dist/{src/lib → lib}/ast/features/if.js +6 -6
- package/dist/{src/lib → lib}/ast/features/index.js +3 -2
- package/dist/{src/lib → lib}/ast/features/inlinecssvariables.js +12 -10
- package/dist/lib/ast/features/mixin.js +953 -0
- package/dist/{src/lib → lib}/ast/features/prefix.js +39 -39
- package/dist/lib/ast/features/shorthand.js +129 -0
- package/dist/lib/ast/features/transform.js +188 -0
- package/dist/{src/lib → lib}/ast/features/type.js +2 -2
- package/dist/{src/lib → lib}/ast/math/expression.js +24 -24
- package/dist/{src/lib → lib}/ast/math/math.js +2 -2
- package/dist/{src/lib → lib}/ast/minify.js +745 -201
- package/dist/lib/ast/mixins/custom-function.js +393 -0
- package/dist/lib/ast/mixins/utils.js +53 -0
- package/dist/lib/ast/mixins/variables.js +678 -0
- package/dist/lib/ast/strings.js +906 -0
- package/dist/lib/ast/transform/compute.js +560 -0
- package/dist/lib/ast/transform/matrix.js +67 -0
- package/dist/lib/ast/transform/minify.js +325 -0
- package/dist/lib/ast/transform/perspective.js +24 -0
- package/dist/{src/lib → lib}/ast/transform/rotate.js +16 -7
- package/dist/lib/ast/transform/scale.js +43 -0
- package/dist/lib/ast/transform/skew.js +38 -0
- package/dist/lib/ast/transform/translate.js +56 -0
- package/dist/lib/ast/transform/utils.js +390 -0
- package/dist/{src/lib → lib}/ast/types.js +2 -2
- package/dist/{src/lib → lib}/ast/walk.js +2 -2
- package/dist/{src/lib → lib}/fs/resolve.js +2 -2
- package/dist/{src/lib → lib}/parser/declaration/list.js +25 -8
- package/dist/{src/lib → lib}/parser/declaration/map.js +15 -15
- package/dist/{src/lib → lib}/parser/declaration/set.js +5 -5
- package/dist/{src/lib → lib}/parser/input.js +18 -3
- package/dist/{src/lib → lib}/parser/linesmap.js +2 -2
- package/dist/{src/lib → lib}/parser/parse.js +425 -258
- package/dist/{src/lib → lib}/parser/source.js +2 -2
- package/dist/{src/lib → lib}/parser/tokenize.js +480 -312
- package/dist/{src/lib → lib}/parser/utils/angle.js +3 -3
- package/dist/{src/lib → lib}/parser/utils/at-rule-container.js +12 -12
- package/dist/{src/lib → lib}/parser/utils/at-rule-font-feature-values.js +3 -3
- package/dist/{src/lib → lib}/parser/utils/at-rule-generic.js +7 -7
- package/dist/{src/lib → lib}/parser/utils/at-rule-import.js +10 -10
- package/dist/{src/lib → lib}/parser/utils/at-rule-media.js +14 -14
- package/dist/{src/lib → lib}/parser/utils/at-rule-support.js +9 -14
- package/dist/{src/lib → lib}/parser/utils/at-rule-when-else.js +6 -6
- package/dist/{src/lib → lib}/parser/utils/at-rule.js +3 -3
- package/dist/{src/lib → lib}/parser/utils/base64.js +2 -2
- package/dist/lib/parser/utils/cache.js +53 -0
- package/dist/lib/parser/utils/canonical.js +78 -0
- package/dist/lib/parser/utils/codes.js +93 -0
- package/dist/{src/lib → lib}/parser/utils/config.js +2 -2
- package/dist/{src/lib → lib}/parser/utils/declaration.js +31 -26
- package/dist/{src/lib → lib}/parser/utils/eq.js +2 -2
- package/dist/{src/lib → lib}/parser/utils/hash.js +2 -2
- package/dist/{src/lib → lib}/parser/utils/selector.js +305 -63
- package/dist/{src/lib → lib}/parser/utils/text.js +2 -2
- package/dist/{src/lib → lib}/parser/utils/token.js +2 -2
- package/dist/{src/lib → lib}/parser/utils/type.js +9 -7
- package/dist/{src/lib → lib}/printer/render.js +420 -152
- package/dist/lib/printer/result.js +148 -0
- package/dist/{src/lib → lib}/printer/sourcemap/lib/codec.js +2 -2
- package/dist/{src/lib → lib}/printer/sourcemap/sourcemap.js +2 -2
- package/dist/lib/printer/writer.js +252 -0
- package/dist/{src/lib → lib}/syntax/color/a98rgb.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/alpha.js +10 -10
- package/dist/{src/lib → lib}/syntax/color/cmyk.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/color-mix.js +18 -18
- package/dist/{src/lib → lib}/syntax/color/color.js +18 -18
- package/dist/{src/lib → lib}/syntax/color/hex.js +3 -3
- package/dist/{src/lib → lib}/syntax/color/hsl.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/hwb.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/lab.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/lch.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/oklab.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/oklch.js +3 -3
- package/dist/{src/lib → lib}/syntax/color/p3.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/prophotorgb.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/rec2020.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/relative-color.js +14 -14
- package/dist/{src/lib → lib}/syntax/color/rgb.js +4 -4
- package/dist/{src/lib → lib}/syntax/color/srgb.js +5 -5
- package/dist/{src/lib → lib}/syntax/color/utils/color-type.js +4 -4
- package/dist/{src/lib → lib}/syntax/color/utils/colorspace.js +10 -10
- package/dist/{src/lib → lib}/syntax/color/utils/components.js +5 -5
- package/dist/{src/lib → lib}/syntax/color/utils/distance.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/utils/make-color.js +3 -3
- package/dist/{src/lib → lib}/syntax/color/utils/matrix.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/xyz.js +2 -2
- package/dist/{src/lib → lib}/syntax/color/xyzd50.js +2 -2
- package/dist/{src/lib → lib}/syntax/constants.js +26 -3
- package/dist/{src/lib → lib}/syntax/syntax.js +37 -29
- package/dist/{src/lib → lib}/validation/config.js +23 -10
- package/dist/lib/validation/first.js +571 -0
- package/dist/{src/lib → lib}/validation/match.js +292 -150
- package/dist/{src/lib → lib}/validation/parser/parse.js +2 -2
- package/dist/{src/lib → lib}/validation/parser/typedef.js +2 -2
- package/dist/{src/lib → lib}/validation/utils/list.js +3 -19
- package/dist/{src/node.js → node.js} +52 -34
- package/dist/{src/types.js → types.js} +2 -2
- package/dist/{src/utils → utils}/sync.js +10 -5
- package/dist/version.d.ts +4 -0
- package/dist/version.js +13 -0
- package/dist/{src/web.js → web.js} +47 -34
- package/package.json +12 -12
- package/dist/package.json.js +0 -10
- package/dist/src/lib/ast/features/shorthand.js +0 -95
- package/dist/src/lib/ast/features/transform.js +0 -90
- package/dist/src/lib/ast/transform/compute.js +0 -362
- package/dist/src/lib/ast/transform/matrix.js +0 -88
- package/dist/src/lib/ast/transform/minify.js +0 -267
- package/dist/src/lib/ast/transform/perspective.js +0 -16
- package/dist/src/lib/ast/transform/scale.js +0 -39
- package/dist/src/lib/ast/transform/skew.js +0 -30
- package/dist/src/lib/ast/transform/translate.js +0 -39
- package/dist/src/lib/ast/transform/utils.js +0 -287
- package/dist/src/lib/parser/utils/cache.js +0 -54
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# v2.2.0
|
|
4
|
+
|
|
5
|
+
## Bugs
|
|
6
|
+
|
|
7
|
+
- [x] minifier: the universal selector was removed before a combinator: `.foo *+.x` became `.foo +.x`, `.a * .b` became `.a .b`, `*|*` became `|*`
|
|
8
|
+
- [x] minifier: the selectors factored with `:is()` lost the descendant combinator: `.foo .a,.foo .b` became `.foo:is(.a,.b)` instead of `.foo :is(.a,.b)`
|
|
9
|
+
- [x] minifier: the declarations of a rule were moved across an `@apply` rule, an empty contents block was removed: `@apply --mixin {}`
|
|
10
|
+
- [x] minifier: the unit of the `initial-value` of `@property` was removed: `initial-value: 0deg` became `initial-value: 0`, which is not a valid `<angle>`
|
|
11
|
+
- [x] minifier: there is no early return in a `@function`: the `result` that precedes the conditional rules is moved after them. `result: 16px; @media (...) { result: 20px }` -> `@media (...) { result: 20px } result: 16px`
|
|
12
|
+
- [x] minifier: the conditional rules of a `@function` were removed when they were placed before the last `result`: they are never removed
|
|
13
|
+
- [x] minifier: the `result` descriptors of a `@function` were only deduplicated with `{validation: true}`: `@function --mypi() { result: 3; result: 3.14; }` -> `@function --mypi(){result:3.14}`
|
|
14
|
+
- [x] an empty `@function` or `@mixin` was removed with `removeEmpty`, and a `@function` with an empty result (`result: ;`) was dropped: they are valid definitions
|
|
15
|
+
- [x] a declaration that is not `!important` no longer overrides a previous `!important` declaration of the same property: `.a{color:red !important;color:blue}` -> `.a{color:red!important}`
|
|
16
|
+
- [x] minifier: the merge of two rules is kept only when the output is smaller (or has the same size and removes a rule). the merge of a rule into a rule that keeps some declarations repeated the selector of that rule: `html{margin:0}body,div,...{margin:0;font:inherit}` became `html,body,div,...{margin:0}body,div,...{font:inherit}`. the minified output
|
|
17
|
+
- [x] minifier: `text-emphasis` declarations threw `Cannot read properties of undefined (reading 'includes')` (`text-emphasis-color` has no keyword)
|
|
18
|
+
- [x] `parse()`, `parseSync()`, `transform()`, `transformSync()` and `render()` no longer modify the options object of the caller: a reused options object kept the source and the code units of the first input, and its validation (sync api) traversed them at every call. the sync api options check only traverses the plain objects and the arrays of `blueprint.css` was larger than the output of the fast mode (`minify: false`)
|
|
19
|
+
|
|
20
|
+
## Feature
|
|
21
|
+
- [x] experimental: evaluate css mixins with `{evaluateMixins: true}`: the `@apply` rules are replaced by the mixin body, the private variables (`@private`, mixin arguments, custom properties of the rule) are substituted https://drafts.csswg.org/css-mixins-1/#mixin-rule
|
|
22
|
+
- [x] minification: `@apply --mixin()` is minified to `@apply --mixin`
|
|
23
|
+
- [x] the evaluated mixins and the mixins that are not referenced are replaced with a comment, they are kept with `{keepMixins: true}`
|
|
24
|
+
- [x] a mixin can be defined in a cascade layer or a conditional group rule that is not nested in a style rule
|
|
25
|
+
- [x] custom functions: a call that is not evaluated makes the declaration, the custom function and the mixin that contain it fail, they are not evaluated
|
|
26
|
+
- [x] custom functions that contain conditional rules (`@media`, `@supports`, `@container`, `@when`, `@else`) are not evaluated
|
|
27
|
+
- [x] mixins and custom functions: a definition located in a rule or an at-rule is only visible inside of it, it hides the definitions with the same name of the outer scopes. a reference that does not see a definition is not evaluated
|
|
28
|
+
- [x] mixins: `@contents` is replaced with a copy of the contents block of the `@apply` rule, or with its default contents. `@result` is supported
|
|
29
|
+
- [x] mixins: the value of a typed argument is computed on the element the mixin is applied to, using a registered custom property (`@property`) when a descendant references it
|
|
30
|
+
- [x] evaluate the custom functions with `{evaluateMixins: true}`: the custom function calls (`--fn(1px)`) are replaced by the result of the function
|
|
31
|
+
- [x] the rules that apply a mixin are not merged
|
|
32
|
+
- [x] mixins and custom functions: a value that is not valid is left as is. a mixin that is not valid is ignored and left as is
|
|
33
|
+
- [x] custom functions: a `@function` rule whose parameters contain the same name more than once is invalid, it is dropped when `{evaluateMixins: true}`. the custom functions see the custom properties of the call site. the css-wide keywords of the local variables: `initial` is the value of the parameter, `inherit` and `unset` the value of the calling context. the invalid declarations are not evaluated
|
|
34
|
+
- [x] shorthand properties `padding-inline`, `padding-block`, `margin-inline` and `margin-block`: `.a{margin-inline-start:auto;margin-inline-end:auto}` -> `.a{margin-inline:auto}`
|
|
35
|
+
- [x] `RenderResult` and `TransformResult` are classes. the generated css is accumulated as UTF-8 bytes in `result.write` (`Uint8Array`), `result.code` is a getter that decodes the bytes once, when it is first read.
|
|
36
|
+
|
|
37
|
+
## Performance
|
|
38
|
+
- [x] avoid temporary strings allocation
|
|
39
|
+
- [x] faster css transform minification
|
|
40
|
+
|
|
41
|
+
## Validation
|
|
42
|
+
- [x] rewrite validation to reduce execution time
|
|
43
|
+
|
|
3
44
|
# v2.1.0
|
|
4
45
|
|
|
5
46
|
## Bugs
|
|
@@ -11,7 +52,7 @@
|
|
|
11
52
|
## Feature
|
|
12
53
|
|
|
13
54
|
- [x] now accepting arraybuffer as input data: transformSync(arraybuffer);
|
|
14
|
-
- [
|
|
55
|
+
- [ ] renamed 'word-wrap' to 'overflow-wrap', 'grid-gap' to 'gap', 'grid-row-gap' to 'row-gap', 'grid-column-gap' to 'column-gap', 'font-stretch' to 'font-width'.
|
|
15
56
|
|
|
16
57
|
## Validation
|
|
17
58
|
- [x] switching syntax definitions source from mdn-data to webref/css
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ A zero-allocation, high-performance CSS processing engine for Node.js and the br
|
|
|
9
9
|
Every stylesheet is fully parsed into a structured AST, with token values represented as typed data. This provides a reliable semantic foundation for custom transformations, plugin development, and advanced stylesheet analysis without relying on raw string manipulation.
|
|
10
10
|
|
|
11
11
|
> [!NOTE]
|
|
12
|
-
> Version 2.0 has been rewritten to use arena memory for AST nodes and tokens, improving memory usage and performance. On the Tailwind CSS parsing and validation workload, runtime is
|
|
12
|
+
> Version 2.2.0 has been rewritten to use arena memory for AST nodes and tokens, improving memory usage and performance. On the Tailwind CSS parsing and validation workload, runtime is **59% faster than v1.8.2** while using less memory.<br>
|
|
13
13
|
This major release also introduces breaking changes and removes deprecated features. See the [migration guide](https://tbela99.github.io/css-parser/docs/documents/Guide.Migration.html) for details.
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
@@ -30,7 +30,7 @@ $ deno add @tbela99/css-parser
|
|
|
30
30
|
|
|
31
31
|
* **Zero dependencies** — lightweight and easy to integrate into any project.
|
|
32
32
|
* **All-in-one CSS parsing solution** covering parsing, validation, transformation, minification, and AST manipulation.
|
|
33
|
-
* **Standards-based CSS validation** powered by
|
|
33
|
+
* **Standards-based CSS validation** powered by the W3C specification definitions ([@webref/css](https://github.com/w3c/webref/tree/main/packages/css)).
|
|
34
34
|
* **Full CSS Modules support** for modern component-based workflows.
|
|
35
35
|
* **Fault-tolerant parsing** that follows the CSS Syntax Module Level 3 specification and always produces a complete, structured parse result.
|
|
36
36
|
* **Typed tokens and AST** — parsed CSS is exposed as strongly typed tokens and nodes so plugins and transforms can operate on semantic structures.
|
|
@@ -45,7 +45,9 @@ $ deno add @tbela99/css-parser
|
|
|
45
45
|
* **CSS variable inlining** where values can be safely resolved.
|
|
46
46
|
* **Duplicate declaration removal** to eliminate redundant rules.
|
|
47
47
|
* **`@import` flattening** to produce self-contained stylesheets.
|
|
48
|
+
* **Vendor prefix cleanup** to modernize generated CSS.
|
|
48
49
|
* **Binary input** — the css can be a string, an `ArrayBuffer` or an `ArrayBufferView` (utf-8 bytes, `Uint8Array`, `Buffer`): an ASCII buffer is tokenized without copy.
|
|
50
|
+
* **Experimental**: evaluate @mixin and @function
|
|
49
51
|
* **51.5kb** once minified and gzipped.
|
|
50
52
|
|
|
51
53
|
## Vendor prefix removal
|
|
@@ -55,6 +57,7 @@ $ deno add @tbela99/css-parser
|
|
|
55
57
|
CSS-Parser can transform these modern CSS features into lower-level CSS syntax:
|
|
56
58
|
* **Nested CSS transpilation** to legacy-compatible syntax.
|
|
57
59
|
* **`if()` function transpilation** for broader browser compatibility.
|
|
60
|
+
* **CSS mixins and custom functions evaluation** the `@apply` rules are replaced by the mixin body, the custom function calls are replaced by their result.
|
|
58
61
|
* **`color-mix()` function conversion** convert new color-mix() syntax to any of the supported colors.
|
|
59
62
|
|
|
60
63
|
## Benchmark
|
|
@@ -67,9 +70,9 @@ A sample result:
|
|
|
67
70
|
|
|
68
71
|
| File | ligthningcss | CSS Parser |
|
|
69
72
|
| ------------------------------ | ------------- | ------------- |
|
|
70
|
-
| tailwind.css - 2380419 bytes | 1864728 bytes |
|
|
71
|
-
| bootstrap-4.css - 200078 bytes | 153616 bytes |
|
|
72
|
-
| bootstrap-5.css - 205481 bytes | 159987 bytes |
|
|
73
|
+
| tailwind.css - 2380419 bytes | 1864728 bytes | 1624148 bytes |
|
|
74
|
+
| bootstrap-4.css - 200078 bytes | 153616 bytes | 144391 bytes |
|
|
75
|
+
| bootstrap-5.css - 205481 bytes | 159987 bytes | 150764 bytes |
|
|
73
76
|
|
|
74
77
|
On the [complete benchmark suite](https://tbela99.github.io/css-parser/benchmark/index.html), css-parser generated a total output size of 2,158,698 bytes, compared to 2,494,113 bytes for Lightning CSS and larger outputs for all other tested minifiers.
|
|
75
78
|
While some tools prioritize raw execution speed, css-parser focuses on maximizing compression while preserving stylesheet semantics, resulting in consistently smaller production bundles.
|
|
@@ -114,8 +117,8 @@ Performance vs execution speed comparison
|
|
|
114
117
|
| File: tailwind.css | Speed optimization | Minification optimization |
|
|
115
118
|
| --------------------- | ------------------ | ------------------------- |
|
|
116
119
|
| Size: 2,380,419 bytes | 1,890,835 bytes | 1,633,188 bytes |
|
|
117
|
-
| Time |
|
|
118
|
-
| Size reduction | -20.
|
|
120
|
+
| Time | 109.07 ms | 191.85 ms |
|
|
121
|
+
| Size reduction | -20.7% | -31.8% |
|
|
119
122
|
|
|
120
123
|
## Playground
|
|
121
124
|
|
|
@@ -321,11 +324,15 @@ See [Ast Manipulation](https://tbela99.github.io/css-parser/docs/documents/Guide
|
|
|
321
324
|
- [x] inset
|
|
322
325
|
- [x] list-style
|
|
323
326
|
- [x] margin
|
|
327
|
+
- [x] margin-block
|
|
328
|
+
- [x] margin-inline
|
|
324
329
|
- [ ] mask
|
|
325
330
|
- [ ] offset
|
|
326
331
|
- [x] outline
|
|
327
332
|
- [x] overflow
|
|
328
333
|
- [x] padding
|
|
334
|
+
- [x] padding-block
|
|
335
|
+
- [x] padding-inline
|
|
329
336
|
- [ ] place-content
|
|
330
337
|
- [ ] place-items
|
|
331
338
|
- [ ] place-self
|
package/architecture.png
CHANGED
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CSS parser, minifier and validator for node and the browser
|
|
2
|
+
CSS parser, minifier and validator for node, deno, bun and the browser
|
|
3
3
|
|
|
4
4
|
Author(s): Thierry Bela
|
|
5
|
-
Version: 2.
|
|
5
|
+
Version: 2.2.0
|
|
6
6
|
License: MIT
|
|
7
7
|
*/
|
|
8
8
|
var properties = {
|
|
@@ -88,6 +88,50 @@ var properties = {
|
|
|
88
88
|
"margin-left": {
|
|
89
89
|
shorthand: "margin"
|
|
90
90
|
},
|
|
91
|
+
"margin-inline": {
|
|
92
|
+
shorthand: "margin-inline",
|
|
93
|
+
properties: [
|
|
94
|
+
"margin-inline-start",
|
|
95
|
+
"margin-inline-end"
|
|
96
|
+
],
|
|
97
|
+
types: [
|
|
98
|
+
"Length",
|
|
99
|
+
"Perc"
|
|
100
|
+
],
|
|
101
|
+
multiple: false,
|
|
102
|
+
separator: null,
|
|
103
|
+
keywords: [
|
|
104
|
+
"auto"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"margin-inline-start": {
|
|
108
|
+
shorthand: "margin-inline"
|
|
109
|
+
},
|
|
110
|
+
"margin-inline-end": {
|
|
111
|
+
shorthand: "margin-inline"
|
|
112
|
+
},
|
|
113
|
+
"margin-block": {
|
|
114
|
+
shorthand: "margin-block",
|
|
115
|
+
properties: [
|
|
116
|
+
"margin-block-start",
|
|
117
|
+
"margin-block-end"
|
|
118
|
+
],
|
|
119
|
+
types: [
|
|
120
|
+
"Length",
|
|
121
|
+
"Perc"
|
|
122
|
+
],
|
|
123
|
+
multiple: false,
|
|
124
|
+
separator: null,
|
|
125
|
+
keywords: [
|
|
126
|
+
"auto"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"margin-block-start": {
|
|
130
|
+
shorthand: "margin-block"
|
|
131
|
+
},
|
|
132
|
+
"margin-block-end": {
|
|
133
|
+
shorthand: "margin-block"
|
|
134
|
+
},
|
|
91
135
|
padding: {
|
|
92
136
|
shorthand: "padding",
|
|
93
137
|
properties: [
|
|
@@ -115,6 +159,44 @@ var properties = {
|
|
|
115
159
|
"padding-left": {
|
|
116
160
|
shorthand: "padding"
|
|
117
161
|
},
|
|
162
|
+
"padding-inline": {
|
|
163
|
+
shorthand: "padding-inline",
|
|
164
|
+
properties: [
|
|
165
|
+
"padding-inline-start",
|
|
166
|
+
"padding-inline-end"
|
|
167
|
+
],
|
|
168
|
+
types: [
|
|
169
|
+
"Length",
|
|
170
|
+
"Perc"
|
|
171
|
+
],
|
|
172
|
+
keywords: [
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"padding-inline-start": {
|
|
176
|
+
shorthand: "padding-inline"
|
|
177
|
+
},
|
|
178
|
+
"padding-inline-end": {
|
|
179
|
+
shorthand: "padding-inline"
|
|
180
|
+
},
|
|
181
|
+
"padding-block": {
|
|
182
|
+
shorthand: "padding-block",
|
|
183
|
+
properties: [
|
|
184
|
+
"padding-block-start",
|
|
185
|
+
"padding-block-end"
|
|
186
|
+
],
|
|
187
|
+
types: [
|
|
188
|
+
"Length",
|
|
189
|
+
"Perc"
|
|
190
|
+
],
|
|
191
|
+
keywords: [
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"padding-block-start": {
|
|
195
|
+
shorthand: "padding-block"
|
|
196
|
+
},
|
|
197
|
+
"padding-block-end": {
|
|
198
|
+
shorthand: "padding-block"
|
|
199
|
+
},
|
|
118
200
|
"scroll-margin": {
|
|
119
201
|
shorthand: "scroll-margin",
|
|
120
202
|
properties: [
|
|
@@ -872,6 +954,8 @@ var map = {
|
|
|
872
954
|
]
|
|
873
955
|
},
|
|
874
956
|
"text-emphasis-color": {
|
|
957
|
+
keywords: [
|
|
958
|
+
],
|
|
875
959
|
"default": [
|
|
876
960
|
"currentcolor"
|
|
877
961
|
],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
CSS parser, minifier and validator for node and the browser
|
|
2
|
+
CSS parser, minifier and validator for node, deno, bun and the browser
|
|
3
3
|
|
|
4
4
|
Author(s): Thierry Bela
|
|
5
|
-
Version: 2.
|
|
5
|
+
Version: 2.2.0
|
|
6
6
|
License: MIT
|
|
7
7
|
*/
|
|
8
8
|
var atRules = {
|
|
@@ -240,6 +240,9 @@ var atRules = {
|
|
|
240
240
|
"initial-value": "<declaration-value>?"
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
|
+
"@result": {
|
|
244
|
+
syntax: "@result { <block-contents> }"
|
|
245
|
+
},
|
|
243
246
|
"@right-bottom": {
|
|
244
247
|
syntax: " @right-bottom { <declaration-list> }"
|
|
245
248
|
},
|