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

refactor(material/button): handle disabled states through tokens #28007

Merged
merged 1 commit into from
Oct 26, 2023

Commits on Oct 26, 2023

  1. refactor(material/button): handle disabled states through tokens

    MDC applies disabled styles through the `:disabled` selector which forced us to work around it by using a selector like `.mat-mdc-button[disabled][disabled]` and setting both the disabled and enabled button tokens. This is problematic, because it increases the specificity too much and it introduces space for mistakes, because we have to duplicate the tokens values.
    
    These changes resolve the issue by re-applying the token slots to disabled buttons with the correct selector so that they can reuse the same tokens as the `button` nodes.
    crisbeto committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    3055e07 View commit details
    Browse the repository at this point in the history