Skip to content

Commit ef3aa65

Browse files
jefersonestevommalerba
authored andcommitted
bug(md-slide-toggle): slide toggle should fit to it's content width (#3231)
* bug(md-slide-toggle): slide toggle should fit to it's content width Fixes #3230 * md-slide-toggle: show each slide toggle on it's own row on demo-app * fix to slide toggle css (demo)
1 parent 06fd08d commit ef3aa65

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/demo-app/slide-toggle/slide-toggle-demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div>
1+
<div class="slide-toggle-example">
22

33
<md-slide-toggle color="primary" [(ngModel)]="firstToggle">
44
Default Slide Toggle
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.slide-toggle-example {
2+
display: flex;
3+
flex-direction: column;
4+
align-items: flex-start;
5+
}

src/lib/slide-toggle/slide-toggle.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg
1515

1616

1717
.mat-slide-toggle {
18-
display: flex;
18+
display: inline-block;
1919
height: $mat-slide-toggle-height;
2020

2121
margin: $mat-slide-toggle-margin 0;

0 commit comments

Comments
 (0)