Hierarchy

  • CssHelper

Constructors

Methods

  • 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

      Clear the style tag before appending the styles.

    Returns void

  • Removes CSS rules

    Parameters

    • selector: string

    Returns number

  • Adds CSS rules for the selector based on the given properties

    Parameters

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

      Removes old styles if there are any with the given selector.

    Returns void

Generated using TypeDoc