Increase Tailwind CSS Specificity
npm install tailwindcss-trumpIncrease Tailwind CSS Specificity - without ! important modifier.
> Note: Repeated occurrences of the same simple selector are allowed and do increase specificity.
https://www.w3.org/TR/selectors-3/#specificity
``shnpm
npm install tailwindcss-trump --save-dev
Configuration
Add the plugin to the
plugins array of the tailwind config file. `js
// tailwind.config.js
module.exports = {
// ... plugins: [
// ...
require("tailwindcss-trump"),
],
};
`Optionally set your trump name in the config.
`js
// tailwind.config.js
module.exports = {
theme: {
// ...
trumpName: "bump",
// will result in bump: variant
},
// ...
};
`Usage
Use the
trump: modifier (you can play with it here:`html
``