• Internal

    Applies a theme identifier to a <style> element.

    If the provided id is truthy, the element receives the attribute data-theme set to the given id. Otherwise, the element will get the attribute data-no-theme without any value.

    Parameters

    • el: HTMLStyleElement

      The <style> element to apply the identifier to

    • Optional id: string

      The theme identifier

    Returns boolean

    true, if the style element belongs to a theme