Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 402371e

Browse files
Googlernshahan
authored andcommitted
Add CSS rules for icon labels to material button's _mixins.scss.
PiperOrigin-RevId: 199370540
1 parent dd14485 commit 402371e

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

lib/material_button/_mixins.scss

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ $button-hovered-background: rgba(158, 158, 158, .20);
2929
$button-disabled-color-dark: rgba(255, 255, 255, $mat-dark-opacity-lightest);
3030
$button-disabled-background-dark: rgba(255, 255, 255, $mat-divider-opacity);
3131

32+
// TODO(google): Eventually move to _typography.
33+
$mat-font-size-icon-label: 8px;
34+
3235
// Private used for external mixin, and button-base only.
3336
@mixin _button-raised {
3437
@include material-shadow;
@@ -182,8 +185,21 @@ $button-disabled-background-dark: rgba(255, 255, 255, $mat-divider-opacity);
182185
padding: $mat-grid;
183186
}
184187

185-
&[vertical] .content {
186-
flex-direction: column;
188+
// Used on a icon to make the button have content underneath the icon.
189+
// Do not use without extra content such as a label.
190+
&[vertical] {
191+
font-size: $mat-font-size-icon-label;
192+
193+
.content {
194+
flex-direction: column;
195+
196+
::ng-deep > {
197+
material-icon,
198+
glyph {
199+
margin-bottom: $mat-grid-type;
200+
}
201+
}
202+
}
187203
}
188204
}
189205

0 commit comments

Comments
 (0)