Not Variants
Class | Properties |
---|---|
not-first | &:not(:first-child) |
not-last | &:not(:last-child) |
not-first-of-type | &:not(:first-of-type) |
not-last-of-type | &:not(:last-of-type) |
not-[<value>] | &:not(<value>) |
IMPORTANT
In order to use this feature, your Tailwind version must support the matchVariant
feature. You're safe if using v3.2.1
or above (I'm not sure about the older versions).
Usage
Single import
// tailwind.config.js
import { not } from "tailwindcss-addons"
export default {
plugins: [not],
}
Multi import
// tailwind.config.js
import { allAddons } from "tailwindcss-addons"
export default {
plugins: [
...allAddons({
not: false, // Enabled by default.
}),
],
}