1.0.3 • Published 5 years ago

rtlcss-loader v1.0.3

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

rtlcss loader for webpack

Work just like css-loader and use rtlcss to RTLify your css.

installation

npm i rtlcss-loader -D

Usage

Documentation: Using loaders

module.exports = {
  module: {
    loaders: [
      {
        test: /\.css$/,
        loaders: ['style', 'rtlcss']
      }
    ]
  }
};

for SASS/LESS you'll need sass-loader first :

module.exports = {
  module: {
    loaders: [
      {
        test: /\.scss$/,
        loaders: ['style', 'rtlcss', 'sass']
      }
    ]
  }
};

IMPORTANT

if you want to use rtlcss directives such as /*rtl:ignore*/ make sure you are using it as a SPECIAL comment by adding ! before your comment.

❌ for example :

div {
  /*rtl:ignore*/
  margin: -25px -25px 0 0;
}

✔ must be :

div {
  /*!rtl:ignore*/
  margin: -25px -25px 0 0;
}

License

MIT (http://www.opensource.org/licenses/mit-license.php)