Skip to content

Commit

Permalink
fix(button-toggle): clickable area not stretching when custom width i…
Browse files Browse the repository at this point in the history
…s set (#12642)

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

Fixes #8432.
  • Loading branch information
crisbeto authored and jelbourn committed Aug 21, 2018
1 parent 8fdc2cf commit ecf8b0d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 > * {
Expand Down Expand Up @@ -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;
}
}

0 comments on commit ecf8b0d

Please sign in to comment.