Skip to content

Commit

Permalink
fix(slide-toggle): thumb spacing at end for rtl (#1659)
Browse files Browse the repository at this point in the history
* Ensure that the `md-slide-toggle` always shows the spacing at the end of the `thumb` container.
  • Loading branch information
devversion authored and hansl committed Nov 1, 2016
1 parent 8220452 commit ad3100e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/slide-toggle/slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $md-slide-toggle-height: 24px !default;
$md-slide-toggle-bar-height: 14px !default;
$md-slide-toggle-thumb-size: 20px !default;
$md-slide-toggle-margin: 16px !default;
$md-slide-toggle-spacing: 8px !default;


@mixin md-switch-ripple() {
Expand Down Expand Up @@ -72,7 +73,12 @@ md-slide-toggle {

position: relative;

margin-right: 8px;
margin-right: $md-slide-toggle-spacing;

[dir='rtl'] & {
margin-left: $md-slide-toggle-spacing;
margin-right: 0;
}
}

// The thumb container is responsible for the dragging functionality.
Expand Down

0 comments on commit ad3100e

Please sign in to comment.