-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tailwind): Media query major issues (#1758)
- Loading branch information
1 parent
076039c
commit 6bd37a7
Showing
12 changed files
with
66 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@react-email/tailwind": patch | ||
--- | ||
|
||
Fix duplicate media query styles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@react-email/tailwind": patch | ||
--- | ||
|
||
Fix Promise being returned as a React Node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/tailwind/src/utils/css/remove-if-empty-recursively.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Container, Document } from "postcss"; | ||
|
||
export const removeIfEmptyRecursively = (node: Container | Document) => { | ||
if (node.first === undefined) { | ||
const parent = node.parent; | ||
if (parent) { | ||
node.remove(); | ||
removeIfEmptyRecursively(parent); | ||
} | ||
} | ||
}; |
16 changes: 16 additions & 0 deletions
16
packages/tailwind/src/utils/css/remove-rule-duplicates-from-root.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Root } from "postcss"; | ||
import { removeIfEmptyRecursively } from "./remove-if-empty-recursively"; | ||
|
||
export const removeRuleDuplicatesFromRoot = (root: Root) => { | ||
root.walkRules((rule) => { | ||
root.walkRules(rule.selector, (duplicateRule) => { | ||
if (duplicateRule === rule) return; | ||
|
||
const parent = duplicateRule.parent; | ||
duplicateRule.remove(); | ||
if (parent) { | ||
removeIfEmptyRecursively(parent); | ||
} | ||
}); | ||
}); | ||
}; |
13 changes: 1 addition & 12 deletions
13
packages/tailwind/src/utils/css/resolve-all-css-variables.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
packages/tailwind/src/utils/tailwindcss/__snapshots__/setup-tailwind.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6bd37a7
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.
Successfully deployed to the following URLs:
react-email-demo – ./apps/demo
demo.react.email
react-email-demo-git-main-resend.vercel.app
react-email-demo-resend.vercel.app
react-email-demo.vercel.app