Skip to content

Commit

Permalink
fix(material/button): Move unthemable icon button tokens to theme mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
amysorto committed Oct 20, 2023
1 parent c92fdad commit 536686e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/material/button/_icon-button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@use '@material/density/functions' as mdc-density-functions;
@use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
@use '@material/theme/theme-color' as mdc-theme-color;
@use '../core/style/sass-utils';
@use '../core/tokens/m2/mdc/icon-button' as tokens-mdc-icon-button;

@use './button-theme-private';
Expand All @@ -24,7 +25,10 @@ $_icon-size: 24px;
}

@mixin base($theme) {
// TODO(mmalerba): Move icon button base tokens here
// Add default values for tokens not related to color, typography, or density.
@include sass-utils.current-selector-or-root() {
@include mdc-icon-button-theme.theme(tokens-mdc-icon-button.get-unthemable-tokens());
}
}

@mixin color($theme) {
Expand Down
3 changes: 0 additions & 3 deletions src/material/button/icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
.mat-mdc-icon-button {
// Add the official slots for the MDC component.
@include mdc-icon-button-theme.theme-styles($token-slots);

// Add default values for tokens that aren't outputted by the theming API.
@include mdc-icon-button-theme.theme(m2-mdc-icon-button.get-unthemable-tokens());
}
}

Expand Down

0 comments on commit 536686e

Please sign in to comment.