Optional options for StyleSheetResolve.parse.

type Parse = {
    baseHref?: string;
    excludeSelectorParts?: Iterable<RegExp>;
    includeCSSLayers?: Iterable<RegExp>;
    includeSelectorPartSet?: Set<string>;
    mediaQuery?: boolean;
    urlRewrite?: boolean;
}
Index

Properties

baseHref?: string

This value is used as the base HREF and is used as a fallback origin for any stylesheet that lacks a defined CSSStyleSheet.href (IE inline or synthetic stylesheets). You may provide it when processing inline stylesheets when URL rewriting is necessary.

excludeSelectorParts?: Iterable<RegExp>

A list of RegExp instance used to exclude CSS selector parts from parsed stylesheet data.

includeCSSLayers?: Iterable<RegExp>

A list of RegExp instance used to specifically include in parsing for specific allowed CSS layers if present in the stylesheet.

includeSelectorPartSet?: Set<string>

A Set of strings to exactly match selector parts to include in parsed stylesheet data.

mediaQuery?: boolean

When false, media query / @media parsing is disabled.

true

urlRewrite?: boolean

When false, relative URL rewriting is disabled. Relative URL rewriting based on the CSSStyleSheet.href or provided baseHref option is enabled by default.

true