Skip to content

Commit

Permalink
fix(slide-toggle): remove host element margin (#3761)
Browse files Browse the repository at this point in the history
* Angular Material components should not have any outer-margin on component host elements. Similar as for the checkbox component.
  • Loading branch information
devversion authored and tinayuangao committed Mar 29, 2017
1 parent 3464011 commit cd0b853
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/demo-app/slide-toggle/slide-toggle-demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
display: flex;
flex-direction: column;
align-items: flex-start;
}

md-slide-toggle {
margin: 6px 0;
}
}
2 changes: 0 additions & 2 deletions src/lib/slide-toggle/slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
$mat-slide-toggle-thumb-size: 20px !default;
$mat-slide-toggle-bar-border-radius: 8px !default;
$mat-slide-toggle-height: 24px !default;
$mat-slide-toggle-margin: 16px !default;
$mat-slide-toggle-spacing: 8px !default;
$mat-slide-toggle-ripple-radius: 23px !default;
$mat-slide-toggle-bar-width: 36px !default;
Expand All @@ -19,7 +18,6 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg
display: inline-block;
height: $mat-slide-toggle-height;

margin: $mat-slide-toggle-margin 0;
line-height: $mat-slide-toggle-height;

white-space: nowrap;
Expand Down

0 comments on commit cd0b853

Please sign in to comment.