Skip to main content

StylesConfig

reexport
interface StylesConfig {
  baseStyle?: Readonly<MixedStyleDeclaration>;
  classesStyles?: Readonly<Record<string, MixedStyleDeclaration>>;
  enableCSSInlineProcessing?: boolean;
  enableUserAgentStyles?: boolean;
  idsStyles?: Readonly<Record<string, MixedStyleDeclaration>>;
  tagsStyles?: Readonly<Record<string, MixedStyleDeclaration>>;
}

Fields#

baseStyle#

optional
baseStyle?: Readonly<MixedStyleDeclaration>;

Style for the root element. Inheritable properties will be transferred recursively to child nodes, including text styles.

Remarks

Non-inheritable properties will be ignored.

classesStyles#

optional
classesStyles?: Readonly<Record<string, MixedStyleDeclaration>>;

Styles from classes.

Remarks

Classes styles have a specificity of 10, in compliance with the CSS standard.

enableCSSInlineProcessing#

optional
enableCSSInlineProcessing?: boolean;

Enable or disable inline styles.

Default: true

enableUserAgentStyles#

optional
enableUserAgentStyles?: boolean;

Enable or disable default styles for tags.

Default: false

idsStyles#

optional
idsStyles?: Readonly<Record<string, MixedStyleDeclaration>>;

Styles from ids.

Remarks

Ids styles have a specificity of 100, in compliance with the CSS standard.

tagsStyles#

optional
tagsStyles?: Readonly<Record<string, MixedStyleDeclaration>>;

Custom styles for tags.

Remarks

Tags styles have a specificity of 1, in compliance with the CSS standard.