diff --git a/.changeset/icy-ghosts-move.md b/.changeset/icy-ghosts-move.md new file mode 100644 index 0000000000..a45770f10c --- /dev/null +++ b/.changeset/icy-ghosts-move.md @@ -0,0 +1,6 @@ +--- +"@react-email/tailwind": minor +"@react-email/components": minor +--- + +fix `max-*` breakpoints generating invalid CSS diff --git a/packages/tailwind/package.json b/packages/tailwind/package.json index fab11dce3b..6ce1be219c 100644 --- a/packages/tailwind/package.json +++ b/packages/tailwind/package.json @@ -58,6 +58,7 @@ "@vitejs/plugin-react": "4.4.1", "postcss": "8.5.3", "postcss-selector-parser": "7.1.0", + "postcss-value-parser": "4.2.0", "react-dom": "^19", "shelljs": "0.9.2", "tailwindcss": "3.4.10", diff --git a/packages/tailwind/src/__snapshots__/tailwind.spec.tsx.snap b/packages/tailwind/src/__snapshots__/tailwind.spec.tsx.snap index 76d7a2b1da..785b34cde5 100644 --- a/packages/tailwind/src/__snapshots__/tailwind.spec.tsx.snap +++ b/packages/tailwind/src/__snapshots__/tailwind.spec.tsx.snap @@ -2,7 +2,7 @@ exports[`Custom plugins config > should be able to use custom plugins 1`] = `"
"`; -exports[`Custom plugins config > should be able to use custom plugins with responsive styles 1`] = `"
"`; +exports[`Custom plugins config > should be able to use custom plugins with responsive styles 1`] = `"
"`; exports[`Custom theme config > should be able to use custom border radius 1`] = `"
"`; @@ -14,11 +14,11 @@ exports[`Custom theme config > should be able to use custom spacing 1`] = `" should be able to use custom text alignment 1`] = `"
"`; -exports[`Responsive styles > should add css to and keep responsive class names 1`] = `"
"`; +exports[`Responsive styles > should add css to and keep responsive class names 1`] = `"
"`; -exports[`Responsive styles > should not have duplicate media queries 1`] = `"
"`; +exports[`Responsive styles > should not have duplicate media queries 1`] = `"
"`; -exports[`Responsive styles > should persist existing elements 1`] = `"
"`; +exports[`Responsive styles > should persist existing elements 1`] = `"
"`; exports[`Responsive styles > should throw an error when used without a 1`] = ` [Error: You are trying to use the following Tailwind classes that cannot be inlined: sm:bg-red-500. @@ -44,11 +44,13 @@ If you do already have a element at some depth, please file a bug https://github.com/resend/react-email/issues/new?assignees=&labels=Type%3A+Bug&projects=&template=1.bug_report.yml.] `; -exports[`Responsive styles > should work with arbitrarily deep (in the React tree) elements 1`] = `"
"`; +exports[`Responsive styles > should work with arbitrarily deep (in the React tree) elements 1`] = `"
"`; -exports[`Responsive styles > should work with arbitrarily deep (in the React tree) elements 2`] = `"
"`; +exports[`Responsive styles > should work with arbitrarily deep (in the React tree) elements 2`] = `"
"`; -exports[`Responsive styles > should work with relatively complex media query utilities 1`] = `"

I am some text

"`; +exports[`Responsive styles > should work with max-* breakpoints 1`] = `"
Test
"`; + +exports[`Responsive styles > should work with relatively complex media query utilities 1`] = `"

I am some text

"`; exports[`Tailwind component >