Created
December 12, 2021 17:26
-
-
Save yainspan/4013a60b8fcb3149259c6d523eb255dc to your computer and use it in GitHub Desktop.
group-last variant
This file contains 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 plugin = require("tailwindcss/plugin"); | |
module.exports = { | |
... | |
plugins: [ | |
... | |
plugin(function ({ addVariant, e }) { | |
addVariant("group-last", ({ modifySelectors, separator }) => { | |
modifySelectors(({ className }) => { | |
return `.group:last-child .${e(`group-last${separator}${className}`)}`; | |
}); | |
}); | |
}), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment