Skip to content

Commit

Permalink
bug(md-slide-toggle): slide toggle should fit to it's content width (#…
Browse files Browse the repository at this point in the history
…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)
  • Loading branch information
jefersonestevo authored and mmalerba committed Mar 13, 2017
1 parent 06fd08d commit ef3aa65
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/demo-app/slide-toggle/slide-toggle-demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div>
<div class="slide-toggle-example">

<md-slide-toggle color="primary" [(ngModel)]="firstToggle">
Default Slide Toggle
Expand Down
5 changes: 5 additions & 0 deletions src/demo-app/slide-toggle/slide-toggle-demo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.slide-toggle-example {
display: flex;
flex-direction: column;
align-items: flex-start;
}
2 changes: 1 addition & 1 deletion src/lib/slide-toggle/slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg


.mat-slide-toggle {
display: flex;
display: inline-block;
height: $mat-slide-toggle-height;

margin: $mat-slide-toggle-margin 0;
Expand Down

0 comments on commit ef3aa65

Please sign in to comment.