alitaheri / jss-rtl

Flip styles using rtl-css-js
MIT License
83 stars 5 forks source link

Why direction: 'ltr' changes to 'rtl'? #12

Closed karianpour closed 4 years ago

karianpour commented 4 years ago

I use Material-UI and Jss. For rtl support I use jss-rtl. My problem is that sometimes I want some part of ui to be left-to-right (i.e. email input box) in this case I set the direction of the input to ltr but the jss-rtl convert it to 'rtl' so I have to opt out of it by flip: false as follow:

emailInput: {
  flip: false,
  direction: 'ltr',
}

I workaround it this way, but I want to know what is the use case of this conversion? I thought that it might be a bug.

alitaheri commented 4 years ago

All the conversions are performed by the (rtl-css-js)[https://github.com/kentcdodds/rtl-css-js] library. So if there is a bizarre use-case for this kind of conversion, you should ask for it there. This library is only a wrapper for that one.