class CssParser extends Parser
new CssParser(): CssParser
CssParser"global" | "local" | "auto" | "pure"ContextObjectbooleanEnable/disable renaming of @keyframes.
stringConfigure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML style attribute).
booleanEnable/disable renaming of @container names.
booleanEnable/disable renaming of custom identifiers.
booleanEnable/disable resolution of @custom-media at-rules (file-local build-time substitution).
booleanEnable/disable resolution of @custom-selector at-rules (file-local build-time expansion to :is(...)).
booleanEnable/disable renaming of dashed identifiers, e. g. custom properties.
"global" | "local" | "auto" | "pure"default mode
"link" | "text" | "css-style-sheet" | "style"Configure how CSS content is exported as default.
booleanAuto-emit <link rel="preload" as="font"> for the primary src URL of each @font-face reachable from an HTML entry's initial CSS. Only the first URL per @font-face is preloaded (preloading every format would double-download). Off by default; parser.css.urlHints rules and per-URL magic comments still override the seeded defaults. Set output.crossOriginLoading so the preload matches the font's CORS fetch.
booleanEnable/disable renaming of @function names.
booleanEnable/disable renaming of grid identifiers.
booleanEnable/disable @import at-rules handling.
booleanUse ES modules named export for css exports.
booleanEnable strict pure mode: every selector must contain at least one local class or id selector.
booleanEnable/disable url()/image-set()/src()/image() functions handling.
UrlHintRule[]URL-referenced-asset default hint rules for this parser (JavaScript new URL(...), CSS url(...), HTML <img src> / <link href> / <script src>).
cssParser.parse(source, state): ParserState
Parses the provided source and updates the parser state.