I want to remove the img rule from tailwind base, is there anyway to do that?
Tailwind base adds this:
img, video {
max-width: 100%;
height: auto;
}
I want to remove that rule. Overrideing it with initial
will not get my expected result.
So unfortunately i cannot do:
img, video {
max-width: initial;
height: initial;
}
height: initial
doesnt seems to be the same as having no height attribute at all. If i override height to initial the height will be the source of the image and height attributes on the <img height="200">
will not be respected.
Yes, it's
As the documentation says, you can override the base properties by using @layer base
.
It's available from v1.9.0
.
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
img, video {
max-width: initial;
height: initial;
}
}
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