Created
July 25, 2020 18:03
-
-
Save HamedFathi/10070de9cde58e65af27f6f42d7c4e2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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