vkalinichev / postcss-rtl

PostCSS plugin for RTL-adaptivity
MIT License
173 stars 33 forks source link

Support option to generate a RTL or a LTR version only, rather than combined #27

Closed bencripps closed 6 years ago

bencripps commented 6 years ago

It would be great if you could pass in some configuration which resulted in either LTR or RTL output -- rather than combined.

Have you thought about adding this feature?

vkalinichev commented 6 years ago

Not sure it's necessary. You can do it directly via rtlcss used by this project

TsuryKnox commented 6 years ago

@vkalinichev how is this possible using rtlcss?

bencripps commented 6 years ago

This postcss plugin has some nice configuration that isn't (yet) supported by rtlcss -- the feature I'm looking for in particular is the skipping of classes in which [dir] is already part of the selector.

For example, using rtlcss, the following CSS:

[dir="rtl"] .thing { left: 10px }

would be rewritten as

[dir="rtl"] .thing { right: 10px }

which isn't desirable.

Using postcssrtl, this CSS go unmodifed.

vkalinichev commented 6 years ago

Implemented by onlyDirection option in 1.2.1 release.