-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix(checkbox): checked state forced color contrast #1699
Conversation
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Based on my testing in WHCM (Desert mode) we can achieve what we want without having to redefine the bg-image
This is sufficient:
@media (forced-colors: active) {
&:checked {
--_ch-bg: ButtonText !important;
}
&:indeterminate {
--_ch-bg: ButtonText !important;
}
}
I am happy to merge the simplified version above in.
Sidenote
While I was in Windows I took some time to explore our DS in WHCM and I could see several components that are not rendering well (including toggles, tags, navigation not showing selected items, etc...). We should probably create a rough inventory of those issues as part of the upcoming spike story.
Without the background image redefinition, we'll have contrast issues if Stacks dark mode is enabled in addition to forced color mode. I understand this would be an unusual circumstance but I figured it was a good idea to account for all possible cases. What do you think @giamir?
Yep, there's definitely room for improvement across our components. The ticket has "A rough inventory of user forced color issues in our components (e.g. toggles, tags, etc…) is added to the document" in the success criteria so I'll make sure to include a list of components (assuming I perform the spike sprint). |
From suggestion made in #1699 (review)
STACKS-599
This PR fixes the lack of contrast in the checked checkbox component when the user has enabled forced color mode.
Before
After