Skip to content

Commit b9204d3

Browse files
committed
refactor(material/button): clean up margin reset (#27954)
When tokenizing the text buttons, I found an issue where MDC previously was resetting the margin of buttons on lower densities. This is something that goes against our coding standards since we don't want to affect anything outside of the component. (cherry picked from commit 8a01967)
1 parent 31143dd commit b9204d3

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/material/button/_button-theme.scss

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,6 @@
231231
$density-tokens: tokens-mdc-text-button.get-density-tokens($theme);
232232
@include mdc-button-text-theme.theme($density-tokens);
233233
@include button-theme-private.touch-target-density($density-scale);
234-
235-
// TODO(crisbeto): before the introduction of tokens, MDC's density mixin was adding
236-
// `margin-top: 0` and `margin-bottom: 0` in its `density` mixin which a lot of internal
237-
// clients came to depend upon. Preserve it to make tokens easier to land.
238-
@if ($density-scale < 0) {
239-
&.mat-mdc-button-base {
240-
margin-top: 0;
241-
margin-bottom: 0;
242-
}
243-
}
244234
}
245235

246236
.mat-mdc-raised-button {

0 commit comments

Comments
 (0)