KC's Workspace
    Preparing search index...

    Interface StyleSheet<D, M>

    A CSS style sheet, representing a .css file or inline <style> element.

    Style sheets can be parsed from a string, constructed from scratch, or created using a Bundler. Then, they can be minified and transformed for a set of target browsers, and serialied to a string.

    Example

    
    // Parse a style sheet from a string. let mut stylesheet = StyleSheet::parse( r#" .foo { color: red; }
    
    .bar { color: red; } "#, ParserOptions::default() ).unwrap();
    
    // Minify the stylesheet. stylesheet.minify(MinifyOptions::default()).unwrap();
    
    // Serialize it to a string. let res = stylesheet.to_css(PrinterOptions::default()).unwrap(); assert_eq!(res.code, ".foo, .bar {\n  color: red;\n}\n"); ```
    
    interface StyleSheet<D = Declaration, M = MediaQuery> {
        licenseComments: string[];
        rules: Rule<D, M>[];
        sourceMapUrls: (string | null)[];
        sources: string[];
    }

    Type Parameters

    Index

    Properties

    licenseComments: string[]

    The license comments that appeared at the start of the file.

    rules: Rule<D, M>[]

    A list of top-level rules within the style sheet.

    sourceMapUrls: (string | null)[]

    The source map URL extracted from the original style sheet.

    sources: string[]

    A list of file names for all source files included within the style sheet. Sources are referenced by index in the loc property of each rule.