Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Style

Simple utility CSS-in-JS implementation.

Hierarchy

  • Style

Index

Properties

Static CLASS_PREFIX

CLASS_PREFIX: string = "__markerjs2_"

Prefix used for all internally created CSS classes.

Static settings

settings: IStyleSettings = Style.defaultSettings

Holds current UI styles.

Static 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;
markerjs2.Style.styleSheetRoot = this.shadowRoot;
markerArea.show();

Known issue/limitation: you can't use marker.js 2 in both main and Shadow DOM on the same page.

Accessors

Static defaultSettings

Static fadeInAnimationClassName

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

    Returns string

Static fadeOutAnimationClassName

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

    Returns string

Methods

Static addClass

Static addRule

  • Add arbitrary CSS rule

    Parameters

    Returns void

Static removeStyleSheet

  • removeStyleSheet(): void
  • Returns void

Generated using TypeDoc