-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(themes): add theme switcher feature #230 #231
Conversation
91e684d
to
867bde4
Compare
Surge demo deployment failed! 😭 |
3273f72
to
2942e74
Compare
}, | ||
{ | ||
label: 'Auro Dark', | ||
url: 'AURO DARK URL' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to darkmode is not a process of switching a URL path to tokens. The darkmode token definitions should be loaded with the light mode defs, only that the darkmode is wrapped in this media query.
@media screen and (prefers-color-scheme: dark) {
:root {
We also need this to trigger the rest of the browser's native color modes.
@media screen and (prefers-color-scheme: dark) {
:root {
color-scheme:dark
}
}
Now if I understand this correctly, the button function will not swap out URls, but update we can update a style tag in the header of the page to toggle the following and that would work the same as the OS preferences.
<html lang="en" style="color-scheme: light/dark;">
{ | ||
label: 'JetStream Dark', | ||
url: 'JETSTREAM DARK URL' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | |
label: 'JetStream Dark', | |
url: 'JETSTREAM DARK URL' | |
} |
<auro-checkbox-group required> | ||
${this.themes.map((theme) => html` | ||
<auro-checkbox | ||
value="${JSON.stringify(theme)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only 2 themes are Auro and Jetstream. Darkmodes are modes contained within the main theme.
See what spectrum did.
2942e74
to
0b0d41b
Compare
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes: AlaskaAirlines/auro-themeswitcher#1
Summary:
Build out themeswitcher
Type of change:
Please delete options that are not relevant.
Checklist:
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team