Is there any way to override @apply directive on chained selectors?
Example: https://play.tailwindcss.com/2nmGe5yad3
HTML
<ul>
<li class="class-one class-two">Item 1</li>
<li class="class-one class-two">Item 2</li>
<li class="class-one class-two text-red-50 bg-red-800">Item 3</li>
<li class="class-one class-two">Item 4</li>
</ul>
CSS
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
/* also doesnt work with "li.class-one" selector, works only with ".class-one" selector */
.class-one.class-two {
@apply text-black bg-gray-100;
}
}
you can set important:true into tailwind.config,this page can help you.please look at below code:
module.exports = {
mode: 'jit',
important: true,
theme: {},
variants: {},
plugins: [],
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With