Skip to content

Add a class for the current theme to the body element

Daniel Gerhardt requested to merge theme-dom-class into master

Currently, the current theme can be determined using the ThemeService or by reading the localStorage variable.

This adds a class to allow theme-based component styling with pure SCSS.

Example:

:host-context(.theme-dark) {
  // component styling for dark theme
}

Merge request reports