Skip to content

Commit 6c93592

Browse files
authored
refactor(material/button): resolves build failures (#26884)
The icon button theme was using a slash for division instead of `math.div` which causes a deprecation warning to be logged which was breaking one of the tests.
1 parent b049b8d commit 6c93592

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/material/button/_icon-button-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use 'sass:map';
2+
@use 'sass:math';
23
@use '@material/density/functions' as mdc-density-functions;
34
@use '@material/icon-button/mixins' as mdc-icon-button;
45
@use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
@@ -100,7 +101,7 @@ $_icon-size: 24px;
100101
// fails validation because the variable is "undefined" in the sass stack.
101102
width: var(--mdc-icon-button-state-layer-size);
102103
height: var(--mdc-icon-button-state-layer-size);
103-
padding: ($calculated-size - $_icon-size) / 2;
104+
padding: math.div($calculated-size - $_icon-size, 2);
104105

105106
@include button-theme-private.touch-target-density($density-scale);
106107
}

0 commit comments

Comments
 (0)