Skip to content

Commit

Permalink
fix(touch-target): incorrect position in rtl when width is set
Browse files Browse the repository at this point in the history
Currently the `touch-target` mixin produces styles that will set the touch target outside of the host node on RTL layouts (see angular/components#22925). These changes adjust the styles so that the target is always centered.
  • Loading branch information
crisbeto committed Jun 9, 2021
1 parent 2952c6a commit bd1b4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mdc-touch-target/_touch-target.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ $width: $height !default;
@include feature-targeting.targets($feat-structure) {
position: absolute;
top: 50%;
right: 0;
height: $height;
}

Expand All @@ -72,6 +71,7 @@ $width: $height !default;
} @else {
@include feature-targeting.targets($feat-structure) {
left: 0;
right: 0;
transform: translateY(-50%);
}
}
Expand Down

0 comments on commit bd1b4e9

Please sign in to comment.