From bd1b4e9d857f0b8fb7b5b9de9b8d5d78823f386d Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 9 Jun 2021 19:10:31 +0200 Subject: [PATCH] fix(touch-target): incorrect position in rtl when width is set Currently the `touch-target` mixin produces styles that will set the touch target outside of the host node on RTL layouts (see https://github.com/angular/components/pull/22925). These changes adjust the styles so that the target is always centered. --- packages/mdc-touch-target/_touch-target.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mdc-touch-target/_touch-target.scss b/packages/mdc-touch-target/_touch-target.scss index 1466ec417a6..da6a3303dbc 100644 --- a/packages/mdc-touch-target/_touch-target.scss +++ b/packages/mdc-touch-target/_touch-target.scss @@ -58,7 +58,6 @@ $width: $height !default; @include feature-targeting.targets($feat-structure) { position: absolute; top: 50%; - right: 0; height: $height; } @@ -72,6 +71,7 @@ $width: $height !default; } @else { @include feature-targeting.targets($feat-structure) { left: 0; + right: 0; transform: translateY(-50%); } }