@onexer/postcss-tailwind-rtl

PostCSS plugin to add RTL support to tailwind

Usage no npm install needed!

<script type="module">
  import onexerPostcssTailwindRtl from 'https://cdn.skypack.dev/@onexer/postcss-tailwind-rtl';
</script>

README

PostCSS Tailwind Rtl

PostCSS plugin to add RTL support to tailwind.

Usage

Check you project for existed PostCSS config: postcss.config.js in the project root, "postcss" section in package.json or postcss in bundle config.

If you already use PostCSS, add the plugin to plugins list:

module.exports = {
  plugins: [
    require('tailwindcss'),
+   require('@onexer/postcss-tailwind-rtl'),
    require('autoprefixer')
  ]
}

If you do not use PostCSS, add it according to official docs and set this plugin in settings.

HTML Page

You will must add dir property in both html and body in your page for both ltr ot rtl

<html dir="rtl">
<head>...</head>
<body dir="rtl">
...
</body>
</html>

enjoy! :)