@@ -34,6 +34,7 @@ $ deno add @tbela99/css-parser
3434- convert nested css rules to legacy syntax
3535- generate sourcemap
3636- compute css shorthands. see supported properties list below
37+ - experimental minification : css transform module level 2
3738- evaluate math functions: calc(), clamp(), min(), max(), round(), mod(), rem(), sin(), cos(), tan(), asin(), acos(),
3839 atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign()
3940- inline css variables
@@ -96,7 +97,7 @@ Javascript module from cdn
9697
9798<script type =" module" >
9899
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' ;
100101
101102
102103 const css = `
@@ -159,6 +160,7 @@ Include ParseOptions and RenderOptions
159160- expandNestingRules: boolean, optional. convert nesting rules into separate rules. will automatically set nestingRules
160161 to false.
161162- removeDuplicateDeclarations: boolean, optional. remove duplicate declarations.
163+ - computeTransform: boolean, optional. compute css transform functions.
162164- computeShorthand: boolean, optional. compute shorthand properties.
163165- computeCalcExpression: boolean, optional. evaluate calc() expression
164166- inlineCssVariables: boolean, optional. replace some css variables with their actual value. they must be declared once
@@ -176,13 +178,18 @@ Include ParseOptions and RenderOptions
176178- src: string, optional. original css file location to be used with sourcemap, also used to resolve url().
177179- sourcemap: boolean, optional. preserve node location data.
178180
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
180186
187+ - resolveImport: boolean, optional. replace @import rule by the content of the referenced stylesheet.
181188- 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
183191- removeCharset: boolean, optional. remove @charset .
184192- cwd: string, optional. destination directory used to resolve url().
185- - visitor: VisitorNodeMap, optional. node visitor used to transform the ast.
186193- signal: AbortSignal, optional. abort parsing.
187194
188195#### RenderOptions
@@ -701,6 +708,8 @@ for (const {node, parent, root} of walk(ast)) {
701708
702709## Minification
703710
711+ - [x] minify keyframs
712+ - [x] minify transform
704713- [x] evaluate math functions calc(), clamp(), min(), max(), round(), mod(), rem(), sin(), cos(), tan(), asin(),
705714 acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign()
706715- [x] multi-pass minification
0 commit comments