Skip to content

Tailwind pixel unit override not working? #1511

Answered by gabrielmfern
mbforbes asked this question in Q&A
Discussion options

You must be logged in to vote

That's because our Tailwind is currently a little unconventional, in that you need to specify the config as a prop to <Tailwind>. So what you need to do is something like this:

// emails/my-email-template.tsx

// ... other imports
import TailwindConfig from '../tailwind.config';

export default Email() {
  return <Tailwind config={TailwindConfig}>
    {/* ... */}
  </Tailwind>;
}

After that it should be working as you expect.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mbforbes
Comment options

Answer selected by mbforbes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants