Skip to content

Commit

Permalink
Use state-layer-size to correctly position the icon inside of an icon…
Browse files Browse the repository at this point in the history
… button

PiperOrigin-RevId: 559114728
  • Loading branch information
material-web-copybara authored and copybara-github committed Aug 24, 2023
1 parent 3c44cd9 commit ed27278
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/mdc-icon-button/_icon-button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@use '@material/ripple/ripple-theme';
@use '@material/rtl/rtl';
@use '@material/dom/dom';
@use '@material/theme/custom-properties';
@use '@material/theme/keys';
@use '@material/theme/state';
@use '@material/theme/theme';
Expand Down Expand Up @@ -311,6 +312,13 @@ $light-theme: (
@mixin _state-layer-size($size) {
@include theme.property(height, $size);
@include theme.property(width, $size);

@if $size {
$value: custom-properties.get-declaration-value($size);
@if type-of($value) == 'number' {
@include size($value);
}
}
}

@mixin _icon-size($size) {
Expand Down

0 comments on commit ed27278

Please sign in to comment.