From 23222666b0ad3ce3d271cfa9d5a4dd2a66748b8a Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 24 Oct 2023 11:38:33 +0200 Subject: [PATCH] refactor(material/button): handle disabled state of icon buttons through tokens * Fixes that icon buttons weren't using the right token for disabled state. * Fixes that the specificity of the icon button disabled styles was really high. * Moves the logic for generating the palette tokens into the icon button tokens file. * Fixes one place where we were referencing a token directly instead of using the API to generate the name. --- src/dev-app/button/button-demo.html | 19 +++++++++ src/material/button/_icon-button-theme.scss | 39 ++++++------------- src/material/button/icon-button.scss | 26 +++++++------ .../core/tokens/m2/mdc/_icon-button.scss | 25 +++++++++--- 4 files changed, 64 insertions(+), 45 deletions(-) diff --git a/src/dev-app/button/button-demo.html b/src/dev-app/button/button-demo.html index a1b9bd5797fe..a0c78a616a56 100644 --- a/src/dev-app/button/button-demo.html +++ b/src/dev-app/button/button-demo.html @@ -150,6 +150,25 @@

Icon Buttons [mat-icon-button]

+

Icon Button Anchors [mat-icon-button]

+
+ + cached + + + cached + + + backup + + + trending_up + + + visibility + +
+

Fab Buttons [mat-fab]