Skip to content

fix(tailwind): max-* breakpoints generating invalid CSS #2308

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gabrielmfern
Copy link
Collaborator

@gabrielmfern gabrielmfern commented Jun 23, 2025

The issue was with the minifyCss function that was removing the extra space due to its regex not understanding the CSS enough to not remove that. This pull request adds the tests to ensure this doesn't happen again, and fixes it by rewriting the minifyCss function with postcss with code slightly modified from https://github.com/jake-low/postcss-minify

Meant for #2297

Copy link

changeset-bot bot commented Jun 23, 2025

🦋 Changeset detected

Latest commit: 5d0cea0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@react-email/tailwind Minor
@react-email/components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-email ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 1:07pm
react-email-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 1:07pm

Copy link

pkg-pr-new bot commented Jun 23, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email/@react-email/tailwind@2308

commit: 5d0cea0

@gabrielmfern gabrielmfern changed the title fix(tailwind): max-* breakpoints generating invalid CSS fix(tailwind): max-* breakpoints generating invalid CSS Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant