Your guide on how to use and make the most out of RTLCSS
Convert LTR CSS files to RTL using the command line.
You may need to use sudo (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows).
Install RTLCSS’s command line interface (CLI) globally.
npm install -g rtlcss$ rtlcss [option option=parameter ...] [source] [destination]If no destination is specified, output will written to
{source name}.rtl.{source ext}
Convert input.css to output.rtl.css
$ rtlcss input.css output.rtl.cssPrint a help message with available options and exits.
$ rtlcss -h
$ rtlcss --help
Print the current version number and exits.
$ rtlcss -v
$ rtlcss --versionConfiguration can be set using one of the following methods:
rtlcssConfig property..rtlcssrc or .rtlcss.json.$ rtlcss -c
$ rtlcss --config <path>Default .rtlcssrc
{
"options": {
"autoRename": false,
"autoRenameStrict": false,
"blacklist":{},
"clean": true,
"greedy": false,
"processUrls": false,
"stringMap":[],
"useCalc": false,
"aliases":{}
},
"plugins": [ ],
"map": false
}Source Map generation is disabled by default, you can enable it by setting map config to true. If you want more control over source map generation, visit postcss for more details on the available options.
Read input from stdin
$ rtlcss -
$ rtlcss --stdinIf no destination is specificed, the output will be written to
stdout.
Used to indicate source/destination are directories - source directory will be processed recursively.
$ rtlcss -d
$ rtlcss --directoryUsed with Directory option to set the output files extension. Default .rtl.css
$ rtlcss -e ".ext"
$ rtlcss --ext ".ext"Silent mode, no warnings or errors will be printed.
$ rtlcss -s
$ rtlcss --silent