Your guide on how to use and make the most out of RTLCSS
npm install -g rtlcss
var rtlcss = require('rtlcss');
var result = rtlcss.process("body { direction:ltr; }");
//result == body { direction:rtl; }
// directly processes css and return a string containing the processed css
output = rtlcss.process(css [, options , plugins, hooks]);
output // processed CSS
// you can also group all configuration settings into a single object
result = rtlcss.configure(config).process(css, postcssOptions);
result.css // Processed CSS
result.map // Source map
Built on top of PostCSS, an awesome framework, providing you with the power of manipulating CSS via a JS API.
It can be combined with other processors, such as autoprefixer:
var result = postcss().use(rtlcss([options , plugins, hooks]))
.use(autoprefixer())
.process(css);
Convert LTR CSS files to RTL using the command line. For usage and available options see Command Line Usage.
$ rtlcss input.css output.rtl.css