svelte-email
svelte-email copied to clipboard
Tailwind Support
If I try to design the Email with Tailwind, it's not working. Do I have to do any additional preparation to get it working?
<Button style={button} class='bg-red-700 px-12 py-12' href="https://github.com/carstenlebek/svelte-email">
View on GitHub
</Button>
You need to inline your variables in the style prop. I'm guessing it would be a pretty big lift to add Tailwind support, because you would need to find those global styles and apply them directly to the rendered component in the email.
I would love to see this and even could help out to make it happen.
I think it's pretty easy looking at react-emails implementation. They use a package called tw-to-css to render tailwindcss to styles. Shouldn't it be as easy as wrapping the root and compile those styles in?
I use tailwind in all my projects and it always feels like a pain to write plain css.