banira
    Preparing search index...

    Interface CssLoweringOptions

    interface CssLoweringOptions {
        cssTargets?: unknown;
        optimizeCss?: boolean;
        readCss?: (absolutePath: string) => string | undefined;
        transformCss?: (css: string, filename: string) => string;
    }
    Index

    Properties

    cssTargets?: unknown

    lightningcss targets (e.g. from its browserslistToTargets); narrows nesting lowering.

    optimizeCss?: boolean

    Run the inlined CSS through lightningcss before replaceSync — lower CSS nesting for the target browsers and minify (#10). (@import is left as-is: this uses lightningcss transform, which does not resolve/bundle imports.) lightningcss is an optional dependency, loaded lazily (like Playwright/axe); a clear error is thrown if it's missing.

    readCss?: (absolutePath: string) => string | undefined

    Reads the CSS at an absolute path, or returns undefined if it can't be read (in which case the import is left untouched). Defaults to a synchronous disk read; injectable for tests / virtual filesystems.

    transformCss?: (css: string, filename: string) => string

    Overrides the CSS optimizer (default: lightningcss when optimizeCss is set). Injectable for tests and custom pipelines.