vkalinichev / postcss-rtl

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

Add support for Dir-Less with html:not([dir='rtl']) #60

Open manix84 opened 4 years ago

manix84 commented 4 years ago

It'd be handy to add support for Dir-Less selection. This can be accomplished as simply as changing "html[dir='ltr']" to "html:not([dir='rtl'])". This would select all elements that aren't wrapped in a dir='rtl', and so, support more browsers.

vkalinichev commented 4 years ago

What's the point?

dzearing commented 4 years ago

If a user renders styles but does not provide the dir attribute, styles still render with this approach.

Currently if the attribute is omitted, your directionally sensitive properties won't even render.