fix(button-toggle): clickable area not stretching when custom width is set (#12642)

Fixes the button toggle's clickable area not stretching, if the element is stretched beyond its initial width.

Fixes #8432.
This commit is contained in:
Kristiyan Kostadinov
2018-08-21 20:49:27 +02:00
committed by Jeremy Elbourn
parent 8fdc2cfca2
commit ecf8b0d9f0
+6 -5
View File
@@ -35,10 +35,6 @@ $mat-button-toggle-border-radius: 2px !default;
}
}
.mat-button-toggle-disabled .mat-button-toggle-label-content {
cursor: default;
}
.mat-button-toggle {
white-space: nowrap;
position: relative;
@@ -65,7 +61,6 @@ $mat-button-toggle-border-radius: 2px !default;
display: inline-block;
line-height: $mat-button-toggle-height;
padding: $mat-button-toggle-padding;
cursor: pointer;
}
.mat-button-toggle-label-content > * {
@@ -112,4 +107,10 @@ $mat-button-toggle-border-radius: 2px !default;
margin: 0;
font: inherit;
outline: none;
width: 100%; // Stretch the button in case the consumer set a custom width.
cursor: pointer;
.mat-button-toggle-disabled & {
cursor: default;
}
}