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

Low contrast notification text uses the incorrect token when using the dark theme with CSS variables #7857

Closed
1 task done
metonym opened this issue Feb 20, 2021 · 3 comments

Comments

@metonym
Copy link
Collaborator

metonym commented Feb 20, 2021

What package(s) are you using?

  • carbon-components

Detailed description

After upgrading to carbon-components v10.29.0, the text color for a low contrast notification uses the $text-01 token when I believe it should be $inverse-01.

Note: This only happens when using a dark theme combined with CSS custom properties. I've tested the g90/g100 themes without custom CSS properties and they work as expected.

The result is that the text is not legible:

Screen Shot 2021-02-19 at 5 13 11 PM

When inspecting the styles using Chrome DevTools, the selector uses the $text-01 token but falls back to the correct $inverse-01 value (#161616)

Screen Shot 2021-02-19 at 5 13 26 PM

Steps to reproduce the issue

  • Enable CSS custom properties and use a dark theme (g90 or g100)

Unfortunately, I don't have an isolated CodeSandbox, but this bug can be observed when comparing two snapshots of the Carbon Svelte documentation website. The only discernible difference between the snapshots is upgrading from carbon-components v10.28 to v10.29:

@tw15egan
Copy link
Collaborator

Related: #7808, #7801

@emyarod
Copy link
Member

emyarod commented Feb 23, 2021

this should be resolved https://carbon-components-react.netlify.app/?path=/story/notifications--inline

@metonym
Copy link
Collaborator Author

metonym commented Feb 23, 2021

Thank you, following the updated guidance in #7808 resolves my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants