Skip to content

Instantly share code, notes, and snippets.

@HamedFathi
Created July 25, 2020 18:03
Show Gist options
  • Save HamedFathi/10070de9cde58e65af27f6f42d7c4e2d to your computer and use it in GitHub Desktop.
Save HamedFathi/10070de9cde58e65af27f6f42d7c4e2d to your computer and use it in GitHub Desktop.
const postcss = require('postcss')
module.exports = {
theme: {
extend: {}
},
variants: {
float: ['responsive', 'rtl'],
margin: ['responsive', 'rtl'],
padding: ['responsive', 'rtl'],
textAlign: ['responsive', 'rtl']
},
plugins: [
function ({ addVariant }) {
addVariant('rtl', ({ modifySelectors, separator }) => {
modifySelectors(({ className }) => {
return `[dir="rtl"] .rtl\\${separator}${className}`
})
})
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment