Skip to content
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

Notifications and Darkmode #4307

Open
Vandapanda opened this issue Dec 16, 2024 · 1 comment
Open

Notifications and Darkmode #4307

Vandapanda opened this issue Dec 16, 2024 · 1 comment
Labels
needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers needs: refinement

Comments

@Vandapanda
Copy link
Contributor

Notification components (Banner, Toast etc) can have multiple elements in them. How do we handle that the components know what scheme to use? Can we set the components to light only? What happens if a theme needs the component in a darker tone?

@Vandapanda Vandapanda added the needs: 💬 pattern discussion This issue will be discussed in the next Pattern Discussion meeting. label Dec 16, 2024
@gfellerph gfellerph added needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers and removed needs: 💬 pattern discussion This issue will be discussed in the next Pattern Discussion meeting. labels Dec 17, 2024
@gfellerph
Copy link
Member

gfellerph commented Dec 19, 2024

Resolution from Pattern discussion: Use a workaround for the header and footer (setting data-color-scheme="light" on the host). For the banner, create a web component so we're able to read out the color scheme on the client (the resolved token value) and set the color scheme accordingly.

An improvement to data-color-scheme would also be to set the correct text color that should apply in this mode and not only the semantic variables.

Alternative to create web components for banners just to read out the resolved token: add banner classes to the light scheme selector for semantic layer tokens because we know they're all light (might break if one of them ever has a dark background but is faster to implement).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers needs: refinement
Projects
Status: 👀 Triage
Development

No branches or pull requests

2 participants