Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

postcss([ require('postcss-wprtl') ])

See PostCSS docs to setup with Gulp, Grunt or Webpack.

Examples

/* style.css */
.site-branding {
	float: left;
	margin-right: 2em;
	padding: 0;
	max-width: 100%;
}
/* rtl.css */
.site-branding {
	float: right;
	margin-right: 0;
	margin-left: 2em;
}

About

PostCSS plugin for WordPress theme developers to easily create a rtl.css (uses RTLCSS)

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages