Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StyleManager

Simple utility CSS-in-JS implementation.

Hierarchy

  • StyleManager

Index

Constructors

constructor

  • Initializes a new style manager.

    Parameters

    • instanceNo: number

      instance id.

    Returns StyleManager

Properties

settings

settings: IStyleSettings = this.defaultSettings

Holds current UI styles.

styleSheetRoot

styleSheetRoot: HTMLElement

For cases when you need to add the stylesheet to anything other than document.head (default), set this property befor calling MarkerArea.show().

Example: here we set the rendering/placement root (targetRoot) to the shadowRoot of a web componet and set styleSheetRoot to the same value as well.

const markerArea = new markerjs2.MarkerArea(target);
markerArea.targetRoot = this.shadowRoot;
markerArea.styles.styleSheetRoot = this.shadowRoot;
markerArea.show();

Accessors

classNamePrefix

  • get classNamePrefix(): string
  • Prefix used for all internally created CSS classes.

    Returns string

classNamePrefixBase

  • get classNamePrefixBase(): string
  • Static CSS class name used for the wrapper element.

    Returns string

defaultSettings

fadeInAnimationClassName

  • get fadeInAnimationClassName(): string
  • Returns global fade-in animation class name.

    Returns string

fadeOutAnimationClassName

  • get fadeOutAnimationClassName(): string
  • Returns global fade-out animation class name.

    Returns string

Methods

addClass

addRule

  • Add arbitrary CSS rule

    Parameters

    Returns void

removeStyleSheet

  • removeStyleSheet(): void
  • Returns void

Generated using TypeDoc