Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind Support #16

Open
mmailaender opened this issue Jun 22, 2023 · 2 comments
Open

Tailwind Support #16

mmailaender opened this issue Jun 22, 2023 · 2 comments

Comments

@mmailaender
Copy link

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>
@Brandon-Ritchie
Copy link

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.

@juliuslipp
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants