@@ -31,9 +31,10 @@ $ deno add @tbela99/css-parser
31
31
relative color
32
32
- generate nested css rules
33
33
- convert nested css rules to legacy syntax
34
+ - convert colors to any supported color format
34
35
- generate sourcemap
35
36
- compute css shorthands. see supported properties list below
36
- - css transform functions minification
37
+ - minify css transform functions
37
38
- evaluate math functions: calc(), clamp(), min(), max(), etc.
38
39
- inline css variables
39
40
- remove duplicate properties
@@ -210,7 +211,26 @@ Include ParseOptions and RenderOptions
210
211
- expandNestingRules: boolean, optional. expand nesting rules.
211
212
- preserveLicense: boolean, force preserving comments starting with '/\* !' when minify is enabled.
212
213
- removeComments: boolean, remove comments in generated css.
213
- - convertColor: boolean | ColorType, convert colors to the specified color. default to ColorType.HEX.
214
+ - convertColor: boolean | ColorType, convert colors to the specified color. default to ColorType.HEX. supported values are:
215
+ - true: same as ColorType.HEX
216
+ - false: no color conversion
217
+ - ColorType.HEX
218
+ - ColorType.RGB/ColorType.RGBA
219
+ - ColorType.HSL
220
+ - ColorType.HWB
221
+ - ColorType.CMYK/ColorType.DEVICE_CMYK
222
+ - ColorType.SRGB
223
+ - ColorType.SRGB_LINEAR
224
+ - ColorType.DISPLAY_P3
225
+ - ColorType.PROPHOTO_RGB
226
+ - ColorType.A98_RGB
227
+ - ColorType.REC2020
228
+ - ColorType.XYZ/ColorType.XYZ_D65
229
+ - ColorType.XYZ_D50
230
+ - ColorType.LAB
231
+ - ColorType.LCH
232
+ - ColorType.OKLAB
233
+ - ColorType.OKLCH
214
234
215
235
> Sourcemap Options
216
236
@@ -716,15 +736,15 @@ for (const {node, parent, root} of walk(ast)) {
716
736
## Minification
717
737
718
738
- [x] minify keyframes
719
- - [x] minify transform
739
+ - [x] minify transform functions
720
740
- [x] evaluate math functions calc(), clamp(), min(), max(), round(), mod(), rem(), sin(), cos(), tan(), asin(),
721
741
acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs(), sign()
742
+ - [x] minify colors
743
+ - [x] minify numbers and Dimensions tokens
722
744
- [x] multi-pass minification
723
745
- [x] inline css variables
724
746
- [x] merge identical rules
725
747
- [x] merge adjacent rules
726
- - [x] minify colors
727
- - [x] minify numbers and Dimensions tokens
728
748
- [x] compute shorthand: see the list below
729
749
- [x] remove redundant declarations
730
750
- [x] conditionally unwrap : is ()
@@ -733,6 +753,7 @@ for (const {node, parent, root} of walk(ast)) {
733
753
- [x] avoid reparsing (declarations, selectors, at-rule)
734
754
- [x] node and browser versions
735
755
- [x] decode and replace utf-8 escape sequence
756
+ - [x] experimental CSS prefix removal
736
757
737
758
## Computed shorthands properties
738
759
0 commit comments