Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/material/button/_icon-button-theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@use 'sass:map';
@use 'sass:math';
@use './m2-icon-button';
@use './m3-icon-button';
@use '../core/tokens/token-utils';
Expand Down Expand Up @@ -85,14 +84,12 @@
--mdc-icon-button-state-layer-size: #{$calculated-size};
--mat-icon-button-state-layer-size: #{$calculated-size};

// TODO: Switch calculated-size to "var(--mat-icon-button-state-layer-size)"
// Currently fails validation because the variable is "undefined"
// in the sass stack.
// TODO: Switch icon-size to "var(--mat-icon-button-icon-size)". Currently
// fails validation because the variable is "undefined" in the sass stack.
width: var(--mat-icon-button-state-layer-size);
height: var(--mat-icon-button-state-layer-size);
padding: math.div($calculated-size - $icon-size, 2);
padding: calc(
(var(--mat-icon-button-state-layer-size, #{$calculated-size}) -
var(--mat-icon-button-icon-size, #{$icon-size})) / 2
);
}
}
}
Expand Down