Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 0e3dc8e

Browse files
feat: Update icon button theme size function to be able to accept values with rem units.
PiperOrigin-RevId: 467009333
1 parent 47c0c6b commit 0e3dc8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/mdc-icon-button/_icon-button-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ $light-theme: (
147147
@include feature-targeting.targets($feat-structure) {
148148
width: $size;
149149
height: $size;
150-
padding: math.div($size - $icon-size, 2);
150+
padding: calc(($size - $icon-size) / 2);
151151
}
152152

153153
.mdc-icon-button__focus-ring {
@@ -162,7 +162,7 @@ $light-theme: (
162162
// Icon button ripple size is capped at 40px for icon buttons with
163163
// densities -1 and 0 (icon buttons with sizes 44x44 and 48x48px).
164164
// See http://b/192353968 for more info.
165-
@if $size >= 40px and $size <= 48px {
165+
@if math.unit($size) == 'px' and ($size >= 40px and $size <= 48px) {
166166
$component-size: 40px;
167167
}
168168

0 commit comments

Comments
 (0)