Repository navigation
Answered by
asyncliz
Jan 22, 2024
Replies: 1 comment
|
There are often "stateful" color tokens like hover, focus, and pressed that may need to be set for a component. See Why does my color change on hover/focus/pressed? in our FAQ for details. For icon button's tokens, that'd be the following: md-icon-button.orange {
--md-icon-button-icon-color: orange;
--md-icon-button-hover-icon-color: orange;
--md-icon-button-focus-icon-color: orange;
--md-icon-button-pressed-icon-color: orange;
}This gets to be a lot when they're all the same color. We mention in How do I change the color of a button? that you can also set the system color all of the stateful tokens map to. For icon button, that's md-icon-button.orange {
--md-sys-color-on-surface-variant: orange;
}We're working on improving how tokens can be used and customized, so apologies for the confusion! |
0 replies
Answer selected by
tve
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


There are often "stateful" color tokens like hover, focus, and pressed that may need to be set for a component. See Why does my color change on hover/focus/pressed? in our FAQ for details.
For icon button's tokens, that'd be the following:
This gets to be a lot when they're all the same color. We mention in How do I change the color of a button? that you can also set the system color all of the stateful tokens map to.
For icon button, that's
on-surface-variant.