-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: remove theme
attribute from demo html and stories, use classes
#2262
Comments
For the stories, how do we want to proceed? Do we want a knob for the theme class? Or do we just want each story to have another "dark" theme story? |
I vote actual dark theme story for Screener screenshot tests if we can (like the RTL ones) |
Do you think it'd be good to keep the existing theme knobs in place too? |
I'm not sure about the knobs. We would have to use a class which is kind of an odd knob. |
I'm wondering if we should just remove both knobs for What do you think @jcfranco? |
…ing components. #2262 BREAKING CHANGE: Using a 'theme' attribute is no longer supported to theme a component. Instead, a HTML class attribute of 'calcite-theme-light', 'calcite-theme-dark', or 'calcite-theme-auto' should be set on a component or one of its parent elements. Example: `<calcite-button theme="light" />` now becomes `<calcite-button class="calcite-theme-light" />`. The `calcite-theme-auto` class will defer to the browser's CSS 'prefers-color-scheme' media query to decide whether the light or dark theme will be used.
…ing components (#2271) * feat!: Use HTML classes instead of custom 'theme' attributes for theming components. #2262 BREAKING CHANGE: Using a 'theme' attribute is no longer supported to theme a component. Instead, a HTML class attribute of 'calcite-theme-light', 'calcite-theme-dark', or 'calcite-theme-auto' should be set on a component or one of its parent elements. Example: `<calcite-button theme="light" />` now becomes `<calcite-button class="calcite-theme-light" />`. The `calcite-theme-auto` class will defer to the browser's CSS 'prefers-color-scheme' media query to decide whether the light or dark theme will be used. * fix screener tests and utils
Description
This is a follow on to #2189. Now that pr #2194 is in, and we are deprecating the usage of
theme="light"
andtheme="dark"
attributes for hooking into a theme, we need to update our resources:Refactors should instead use the new
.calcite-theme-light
or.calcite-theme-dark
classes for setting deliberate themes on components.(Once we have these resources updated, we'll then add documentation on how to use the light/dark themes via the new classes.)
Which Component
Resources
cc @driskull
The text was updated successfully, but these errors were encountered: