From 34ec567b19115ec37f16879b7b71a4638f8e0bd6 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 24 Oct 2023 18:48:08 +0200 Subject: [PATCH] refactor(material/button): handle disabled state of icon buttons through tokens (#27990) * 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 | 43 ++++++------------- src/material/button/icon-button.scss | 28 ++++++------ .../core/tokens/m2/mdc/_icon-button.scss | 25 ++++++++--- 4 files changed, 66 insertions(+), 49 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]