Optional
beautifypretty print css
Optional
computecompute math functions see supported functions mathFuncs
Optional
computecompute shorthand properties
Optional
computecompute transform functions see supported functions transformFunctions
Optional
convertconvert color to the specified color space. 'true' will convert to HEX
Optional
expandexpand nested rules
Optional
Internal
featuresminify features
Optional
indentindent string
Optional
inlineinline css variables
Optional
lenientlenient validation. retain nodes that failed validation
Optional
minifyenable minification
Optional
nestinggenerate nested rules
Optional
newnew line string
Optional
Internal
outputoutput file. used for url resolution
Optional
parseparse color tokens
Optional
passdefine minification passes.
Optional
preservepreserve license comments. license comments are comments that start with /*!
Optional
removeremove
Optional
removeremove comments
Optional
removeremove duplicate declarations from the same rule
Optional
removeremove empty ast nodes
Optional
removeremove css prefix
Optional
resolveresolve import
Optional
resolveresolve urls
Optional
setset parent node
Optional
signalabort signal
Example: abort after 10 seconds
const result = await parse(cssString, {
signal: AbortSignal.timeout(10000)
});
Optional
sourcemapinclude sourcemap in the ast. sourcemap info is always generated
Optional
srcsource file to be used for sourcemap
Optional
validationenable css validation
see ValidationLevel
Optional
visitornode visitor VisitorNodeMap
Optional
withernder the node along with its parents
transform options