-
Notifications
You must be signed in to change notification settings - Fork 816
fix(tailwind): media queries not getting sanitized sometimes #1929
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
Conversation
🦋 Changeset detectedLatest commit: 845dae5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
27a99ba
to
8dfb96a
Compare
ceeaf0d
to
e7c671a
Compare
c740494
to
b114121
Compare
643b95a
to
35a000c
Compare
be584c9
to
0ab0f29
Compare
addf436
to
ade5f69
Compare
3ff8597
to
3c4ea0a
Compare
75f1cab
to
7c5cd2a
Compare
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Closes #1871. The issue there is pretty clear on what the problem they were having was, the problem particularly was that the internal
candidateRuleCache
from Tailwind was not being cleared. This pull request also adds in a test to ensure that this is working and that there are no future regressions on this.react-email/packages/tailwind/src/utils/tailwindcss/setup-tailwind.ts
Line 27 in 5344b1e
The above line is the actual fix, it literally sets the cache as empty before doing any of the class-to-style resolution.
The specific issue was that the first time a class like
dark:...
(i.e., a class to insert into the user's<Head>
), it worked just fine, but then the second time the same exact class was used again, it seems to simply ignore it, and not do the transformations that are needed.