postcss-directions

PostCSS plugin to convert properties between rtl and ltr. Just prefix usual CSS properties with `-ltr-` or `-rtl-`.

Usage no npm install needed!

<script type="module">
  import postcssDirections from 'https://cdn.skypack.dev/postcss-directions';
</script>

README

PostCSS Directions Build Status

PostCSS plugin to convert properties between rtl and ltr. Just prefix usual CSS properties with -ltr- or -rtl-.

.float-left {
    -ltr-float:left;
    -rtl-float:right;
}
.float-left {
    float:left;
}

Usage

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

Options

  • direction - what prefixed properties to output. Default - ltr

See PostCSS docs for examples for your environment.