<div theme="dark"><!-- insert dark theme components here --></div>
<div class="calcite-theme--dark"><!-- insert dark theme components here --></div>
We should be using a CSS class to set the theme variables instead of the non-standard HTML attribute "theme". We will probably also need to set a --calcite-theme-name or similarly named CSS variable so components know what the current theme is set to.
1.
_Version_: @esri/calcite-components@<version>
@driskull
If this moves to CSS, I'd love to have the option to match the user's system automatically with the prefers-color-scheme media query. Possibly with something like this:
<div class="calcite-theme--auto"><!-- insert components here. Theme will match the user's preferred color scheme.--></div>
yeah that would be possible as well.
If this moves to CSS, I'd love to have the option to match the user's system automatically with the prefers-color-scheme media query.`
+1, this would be a great addition !
@driskull can this issue be closed now?
Assigned to @caripizza . Don't want to verify my own issue.
Most helpful comment
If this moves to CSS, I'd love to have the option to match the user's system automatically with the prefers-color-scheme media query. Possibly with something like this:
<div class="calcite-theme--auto"><!-- insert components here. Theme will match the user's preferred color scheme.--></div>