googlearchive / paper-input

A text input à la Material Design
23 stars 43 forks source link

Caret and label animations don't flip automatically for RTL #37

Open mormil opened 10 years ago

mormil commented 10 years ago

You can easily reproduce this by going to the demo page [1], and setting document.dir='rt'; in the js console. The cause is that the caret and label css styles use "transform" tags, that don't automatically flip like "left" and "right".

[1] http://www.polymer-project.org/components/paper-input/demo.html

morethanreal commented 10 years ago

@mormil, would html[dir=rtl] match if the locality is RTL (vs. setting it manually)?

mormil commented 10 years ago

yes. both have the same effect.

ebidel commented 9 years ago

This came up again on StackOverflow.

I threw together http://jsbin.com/megafucuvapo/1/edit. Far from perfect but it makes all of the necessary changes for RTL.