I can force override class specificity like this in Tailwind CSS 3.0.
<div class="p-1 !p-2">test</div>
However, I occasionally want to override the !p-2, but extra exclamation mark
!!p-3 is not enabled; how can I do this?
I can force override class specificity like this in Tailwind CSS 3.0.
<div class="p-1 !p-2">test</div>
However, I occasionally want to override the !p-2, but extra exclamation mark
!!p-3 is not enabled; how can I do this?
"!" is the !important in CSS.
It is to override the class one position lower line in the .css
If it is a responsive website, you can use breakpoints
<div class="p-1 sm:p-2 md:p-3">test</div>
Otherwise, some programming language must be used.
<?php $className = 1 < 2 ? 'true-class' : 'false-class'; ?>
<div class="<?php echo $className; ?>" />
etc... search: your programing language css class bidding