From 6b46a860c34f8a09ee2f27611ee8f9a3647237ac Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 31 Oct 2016 15:53:13 +0100 Subject: [PATCH] fix(slide-toggle): thumb spacing at end for rtl * Ensure that the `md-slide-toggle` always shows the spacing at the end of the `thumb` container. --- src/lib/slide-toggle/slide-toggle.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/slide-toggle/slide-toggle.scss b/src/lib/slide-toggle/slide-toggle.scss index 8bebeaca8239..2959da562c5b 100644 --- a/src/lib/slide-toggle/slide-toggle.scss +++ b/src/lib/slide-toggle/slide-toggle.scss @@ -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() { @@ -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.