PostCSS-WPRTL
PostCSS plugin for WordPress theme developers to transform style.css into rtl.css. Powered by rtlcss.
By default, WordPress themes load both rtl.css and style.css stylesheets. Therefore rtl.css should only include flipped CSS rules, nothing else.
Features
- Removes all CSS declarations that are unimportant for RTL
- Generates reset values for margins, paddings and borders
- Flips CSS rules from LTR to RTL by using rtlcss
Install
Install the npm package:
$ npm install postcss-wprtl --save-dev
Usage
See PostCSS docs to setup with Gulp, Grunt or Webpack.
Examples
/* style.css */
/* rtl.css */