Tailwind CSS + html2canvas text shift down solution
Using Tailwind CSS and html2canvas causes annoying bug which shifts all texts down when rendering the html to img.
This is cause by Tailwind CSS's preflight - you can fix this by restoring img
tag's display
attribute.
@tailwind base;
@layer base {
img {
@apply inline-block;
}
}
@tailwind components;
@tailwind utilities;
Now it works just as intended:
Solution from here.
✌🏼 Like my content? Subscribe via RSS feed.