From ad3100e8e512b0ba3023a0f092d8cd66177a4298 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 1 Nov 2016 22:07:47 +0100 Subject: [PATCH] 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. --- 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.