Skip to content

Commit ad3100e

Browse files
devversionhansl
authored andcommitted
fix(slide-toggle): thumb spacing at end for rtl (#1659)
* Ensure that the `md-slide-toggle` always shows the spacing at the end of the `thumb` container.
1 parent 8220452 commit ad3100e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $md-slide-toggle-height: 24px !default;
88
$md-slide-toggle-bar-height: 14px !default;
99
$md-slide-toggle-thumb-size: 20px !default;
1010
$md-slide-toggle-margin: 16px !default;
11+
$md-slide-toggle-spacing: 8px !default;
1112

1213

1314
@mixin md-switch-ripple() {
@@ -72,7 +73,12 @@ md-slide-toggle {
7273

7374
position: relative;
7475

75-
margin-right: 8px;
76+
margin-right: $md-slide-toggle-spacing;
77+
78+
[dir='rtl'] & {
79+
margin-left: $md-slide-toggle-spacing;
80+
margin-right: 0;
81+
}
7682
}
7783

7884
// The thumb container is responsible for the dragging functionality.

0 commit comments

Comments
 (0)