@@ -34,6 +34,7 @@ $ deno add @tbela99/css-parser
34
34
- convert nested css rules to legacy syntax
35
35
- generate sourcemap
36
36
- compute css shorthands. see supported properties list below
37
+ - experimental minification : css transform module level 2
37
38
- evaluate math functions: calc(), clamp(), min(), max(), round(), mod(), rem(), sin(), cos(), tan(), asin(), acos(),
38
39
atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign()
39
40
- inline css variables
@@ -96,7 +97,7 @@ Javascript module from cdn
96
97
97
98
<script type =" module" >
98
99
99
- import {transform } from ' https://esm.sh/@tbela99/css-parser@0.9 .0/web' ;
100
+ import {transform } from ' https://esm.sh/@tbela99/css-parser@1.0 .0/web' ;
100
101
101
102
102
103
const css = `
@@ -159,6 +160,7 @@ Include ParseOptions and RenderOptions
159
160
- expandNestingRules: boolean, optional. convert nesting rules into separate rules. will automatically set nestingRules
160
161
to false.
161
162
- removeDuplicateDeclarations: boolean, optional. remove duplicate declarations.
163
+ - computeTransform: boolean, optional. compute css transform functions.
162
164
- computeShorthand: boolean, optional. compute shorthand properties.
163
165
- computeCalcExpression: boolean, optional. evaluate calc() expression
164
166
- inlineCssVariables: boolean, optional. replace some css variables with their actual value. they must be declared once
@@ -176,13 +178,18 @@ Include ParseOptions and RenderOptions
176
178
- src: string, optional. original css file location to be used with sourcemap, also used to resolve url().
177
179
- sourcemap: boolean, optional. preserve node location data.
178
180
179
- > Misc Options
181
+ > Ast Traversal Options
182
+
183
+ - visitor: VisitorNodeMap, optional. node visitor used to transform the ast.
184
+
185
+ > Urls and \@ import Options
180
186
187
+ - resolveImport: boolean, optional. replace @import rule by the content of the referenced stylesheet.
181
188
- resolveUrls: boolean, optional. resolve css 'url()' according to the parameters 'src' and 'cwd'
182
- - resolveImport: boolean, optional. replace @import rule by the content of its referenced stylesheet.
189
+
190
+ > Misc Options
183
191
- removeCharset: boolean, optional. remove @charset .
184
192
- cwd: string, optional. destination directory used to resolve url().
185
- - visitor: VisitorNodeMap, optional. node visitor used to transform the ast.
186
193
- signal: AbortSignal, optional. abort parsing.
187
194
188
195
#### RenderOptions
@@ -701,6 +708,8 @@ for (const {node, parent, root} of walk(ast)) {
701
708
702
709
## Minification
703
710
711
+ - [x] minify keyframs
712
+ - [x] minify transform
704
713
- [x] evaluate math functions calc(), clamp(), min(), max(), round(), mod(), rem(), sin(), cos(), tan(), asin(),
705
714
acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign()
706
715
- [x] multi-pass minification
0 commit comments