@@ -23,7 +23,7 @@ $ deno add @tbela99/css-parser
2323## Features
2424
2525- no dependency
26- - partial css validation based upon mdn-data: at-rules and selectors validation
26+ - CSS validation based upon mdn-data
2727- fault-tolerant parser, will try to fix invalid tokens according to the CSS syntax module 3 recommendations.
2828- fast and efficient minification without unsafe transforms,
2929 see [ benchmark] ( https://tbela99.github.io/css-parser/benchmark/index.html )
@@ -38,6 +38,7 @@ $ deno add @tbela99/css-parser
3838- inline css variables
3939- remove duplicate properties
4040- flatten @import rules
41+ - experimental CSS prefix removal
4142
4243## Playground
4344
@@ -95,7 +96,7 @@ Javascript module from cdn
9596
9697<script type =" module" >
9798
98- import {transform } from ' https://esm.sh/@tbela99/css-parser@1.0 .0/web' ;
99+ import {transform } from ' https://esm.sh/@tbela99/css-parser@1.1 .0/web' ;
99100
100101
101102 const css = `
@@ -165,11 +166,19 @@ Include ParseOptions and RenderOptions
165166 in the : root {} or html {} rule.
166167- removeEmpty: boolean, optional. remove empty rule lists from the ast.
167168
169+ > CSS Prefix Removal Options
170+
171+ - removePrefix: boolean, optional. remove CSS prefixes.
172+
168173> Validation Options
169174
170- - validation: boolean, optional. enable strict css validation using (mdn data)[ https://github.com/mdn/data ] . only the
171- selector is validated at this time.
172- - lenient: boolean, optional. ignore unknown at-rules, pseudo-classes and declarations.
175+ - validation: ValidationLevel | boolean, optional. enable validation. permitted values are:
176+ - ValidationLevel.None: no validation
177+ - ValidationLevel.Default: validate selectors and at-rules (default)
178+ - ValidationLevel.All. validate all nodes
179+ - true: same as ValidationLevel.All.
180+ - false: same as ValidationLevel.None
181+ - lenient: boolean, optional. preserve invalid tokens.
173182
174183> Sourcemap Options
175184
@@ -205,7 +214,7 @@ Include ParseOptions and RenderOptions
205214
206215> Sourcemap Options
207216
208- - sourcemap: boolean, optional. generate sourcemap
217+ - sourcemap: boolean | 'inline' , optional. generate sourcemap.
209218
210219> Misc Options
211220
@@ -706,7 +715,7 @@ for (const {node, parent, root} of walk(ast)) {
706715
707716## Minification
708717
709- - [x] minify keyframs
718+ - [x] minify keyframes
710719- [x] minify transform
711720- [x] evaluate math functions calc(), clamp(), min(), max(), round(), mod(), rem(), sin(), cos(), tan(), asin(),
712721 acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign()
@@ -1030,7 +1039,3 @@ console.debug(await transform(css, options));
10301039// .foo{width:3px}
10311040
10321041```
1033-
1034- ---
1035-
1036- Thanks to [ Jetbrains] ( https://jetbrains.com ) for sponsoring this project with a free license
0 commit comments