Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive list items in RTL get pushed to the left #725

Closed
amsheehan opened this issue May 25, 2017 · 2 comments · Fixed by #746
Closed

Interactive list items in RTL get pushed to the left #725

amsheehan opened this issue May 25, 2017 · 2 comments · Fixed by #746

Comments

@amsheehan
Copy link
Contributor

What MDC-Web Version are you using?

0.11.0

What browser(s) is this bug affecting?

Chrome

What OS are you using?

macOS 10.12.4

What are the steps to reproduce the bug?

  1. open demo
  2. click toggle RTL button

What is the expected behavior?

Margins and padding would be the same but reversed horizontally in RTL contexts

What is the actual behavior?

lists are pushed to the left in RTL

Any other information you believe would be useful?

LTR
screen shot 2017-05-25 at 4 33 25 pm

RTL
screen shot 2017-05-25 at 4 33 32 pm

@robzenn92
Copy link
Contributor

It seems to be caused by mdc-list-item.mdc-ripple-upgraded and in particular by line 164 and line 166.

In fact if we remove both, the behavior is the same as the LTR context.

list

@traviskaufman
Copy link
Contributor

@robzenn92 correct!

Marking this as help wanted.

The offending code is https://github.com/material-components/material-components-web/blob/master/packages/mdc-list/mdc-list.scss#L164 and can be fixed by using mdc-rtl-reflexive-position

  • Change L164 to @include mdc-rtl-reflexive-position(left, $mdc-list-side-padding * -1);

@traviskaufman traviskaufman changed the title List items in RTL get pushed to the left Interactive list items in RTL get pushed to the left May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants