-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Checkbox] Add support for CSS variables #32579
Conversation
These images below represent the change in their hover background when I switched to using Can you please explain what's going on here wrong with my code? |
theme.palette.action.hoverOpacity, | ||
), | ||
backgroundColor: theme.vars | ||
? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` |
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.
You need to add here too the check for the ownerState.color
that you have below.
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.
We don't have action.activeChannel
yet, seems like we have to add it or find other alternatives.
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.
I have fixed the hover background color by applying using palette.primary.mainChannel
and palette.action.hoverOpacity
.
How do I do the check for ownerState.color
, I didn't understand that part ?
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.
It's the same as in #32599 (comment), let's wait for it to be resolved there and we can fix it in this PR too.
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.
Note, I just merged #32599. Feel free to rebase and you will have the activeChannel
in your theme.
See #32579 (comment) |
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.
👍 Thanks for working on it! We're one step to the finish line.
Support for CSS variables with
<CheckBox />