Interface ComponentStypFormatConfig

Hierarchy

  • StypFormatConfig
    • ComponentStypFormatConfig

Properties

hostSelector?: string | Part

Structured CSS selector to use for custom element's host.

It modifies the selectors of produced CSS rules.

For custom element with shadow root:

  • Replaces root CSS rule selector with `:host().
  • When hostSelector is omitted, then replaces root CSS rule selector with :host.
  • If CSS rule selector starts with :host, then replaces :host with :host(<hostSelector>)
  • If CSS rule selector starts with :host(<selector>), then extends <selector> by hostSelector. I.e. appends CSS classes and sub-selectors to it, and fulfills missing element and identifier selectors.

For custom element without shadow root either uses provided hostSelector, or generates a unique one when omitted. And additionally:

  • Replaces root CSS rule selector it with hostSelector.
  • If CSS rule selector starts with :host, then replaces :host with hostSelector.
  • If CSS rule selector starts with :host(<selector>), then replaces :host()withextended byhostSelector`. I.e. appends CSS classes and sub-selectors to it, and fulfills missing element and identifier selectors.
  • Otherwise prepends CSS rule selector with hostSelector.

This selector should not contain a :host sub-selector.

nsAlias?: NamespaceAliaser

Namespace aliaser to use.

Default NamespaceAliaser used when omitted.

renderer?: StypRenderer | readonly StypRenderer[]

Renderer or renderer chain to use.

rootSelector?: undefined

Root CSS selector is never used for custom elements. A hostSelector is applied instead.

scheduler?: RenderScheduler<RenderExecution, RenderScheduleOptions>

DOM rendering operations scheduler.

Creates a render schedule per rule.

ElementRenderScheduler is used when omitted.

Generated using TypeDoc