You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although there is an onlyDirection option in .postcssrc.js for us to config, it can only receive ltr or rtl string explicitly. We couldn't dynamically pass a value based on the html lang attribute. My project set the lang attribute for html tag in runtime, but this plugin set the onlyDirection option when compiling, which happens before runtime. I don't quite sure if this is the reason why it is hard to generate a RTL or a LTR version dynamically.
The text was updated successfully, but these errors were encountered:
Hi @Chorer,
This is a PostCSS plugin. PostCSS is intended to process a CSS input and output a result with the transformations applied by the plugins, it is not intended to process CSS at runtime. Why don‘t you generate LTR and RTL versions separately using RTLCSS (which this plugin uses behind the scenes) and load the correct CSS version from the back-end code that renders your HTML? Or in case that you don‘t have any back-end you could load the CSS dynamically using JavaScript.
Although there is an
onlyDirection
option in.postcssrc.js
for us to config, it can only receiveltr
orrtl
string explicitly. We couldn't dynamically pass a value based on the html lang attribute. My project set the lang attribute for html tag in runtime, but this plugin set theonlyDirection
option when compiling, which happens before runtime. I don't quite sure if this is the reason why it is hard to generate a RTL or a LTR version dynamically.The text was updated successfully, but these errors were encountered: