Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CssHelper

Index

Constructors

constructor

Methods

Static addHeaderStyle

  • addHeaderStyle(id: string, styles: string, clear?: boolean): void
  • Adds the given CSS styles to a style tag in the document head with the given ID.
    Optionally removes an already existing style tag with the given ID before creating the new one.

    !!! Note !!!

    If used extensively (e.g. many calls during rendering of configurator) this method is not very performant and should be used with great care and only if really necessary.

    Usually setStyle should be preferred over this.
    The one great advantage of addHeaderStyle is that it can "bundle" multiple styles in one tag which can be accessed with an unique ID, whereas the styles set via setStyle are only unique because of their selector.

    Parameters

    • id: string
    • styles: string

      Complete CSS

    • Optional clear: boolean

    Returns void

Static removeStyle

  • removeStyle(selector: string): number

Static setStyle

  • setStyle(selector: string, properties: object, removeOld?: boolean): void
  • Adds CSS rules for the selector based on the given properties

    Parameters

    • selector: string
    • properties: object
    • Optional removeOld: boolean

    Returns void

Generated using TypeDoc