-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
tailwindcss v3.4.2 included breaking changes around @apply
#1416
Comments
Turns out it's not a tailwind bug, we just need to activate the |
jagthedrummer
added a commit
that referenced
this issue
Apr 3, 2024
…ables Fixes #1416 Fixes #1074 As noted in #1416 there's been a change in `tailwindcss` around the `@apply` directive. In order to get it to work correctly for nested classes we need to use the `tailswindcss/nesting` plugin. We were already using `postcss-nested`, which is what `tailwindcss/nesting` uses under the hood. So this PR just switches them out. It also moves the `postcss-css-variables` plugin to be higher in the plugin stack for the mailer stylesheet. [That plugin doesn't play nicely when it's below the nesting plugin.](MadLittleMods/postcss-css-variables#135 (comment)) Moving `postcss-css-variables` higher in the stack also seems to have fixed the problems described in #1074. When it's higher in the stack I see almost zero difference in build times between having it activated or not, and the resulting stylesheet is actually _smaller_ when it is activated (~120k vs ~140k).
jagthedrummer
added a commit
that referenced
this issue
Apr 5, 2024
…ables (#1417) * Update tailwind, switch to tailwindcss/nesting, move postcss-css-variables Fixes #1416 Fixes #1074 As noted in #1416 there's been a change in `tailwindcss` around the `@apply` directive. In order to get it to work correctly for nested classes we need to use the `tailswindcss/nesting` plugin. We were already using `postcss-nested`, which is what `tailwindcss/nesting` uses under the hood. So this PR just switches them out. It also moves the `postcss-css-variables` plugin to be higher in the plugin stack for the mailer stylesheet. [That plugin doesn't play nicely when it's below the nesting plugin.](MadLittleMods/postcss-css-variables#135 (comment)) Moving `postcss-css-variables` higher in the stack also seems to have fixed the problems described in #1074. When it's higher in the stack I see almost zero difference in build times between having it activated or not, and the resulting stylesheet is actually _smaller_ when it is activated (~120k vs ~140k). * Add a link to a report about variable support in email clients
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #1386
@depfu
tried to updatetailwindcss
to version 3.4.2 and CI is failing for that PR with this error.The issue seems to be that the
@apply
directive was updated here: tailwindlabs/tailwindcss#13325Given that this happened in a
patch
level version bump it seems like we might be hitting unexpected breakage, so I've opened an issue on the tailwind repo: tailwindlabs/tailwindcss#13433Hopefully this is a bug that can be resolved on the tailwind side. If not we may need to rewrite some CSS in order to upgrade
tailwindcss
past version 3.4.1 (the last version that doesn't throw this error during the build step).The text was updated successfully, but these errors were encountered: