• Removes the given class from element. In contrast to element.classList.remove(...) it also ensures to remove the class attribute, if empty.

    May be used to clean up class-attribute providing no tokens at all.

    Type Parameters

    • T extends Element

    Parameters

    • element: T

      element to remove class from

    • Rest ...tokens: string[]

      class names to remove

    Returns T