Ability to remove the use of Tailwind CSS variables #13002
kirkbushell
started this conversation in
Ideas
Replies: 3 comments 1 reply
This comment was marked as spam.
This comment was marked as spam.
-
I also want to use TW for email generation and can't use variables in my environment, any way to disable them in V4? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm having a similar problem, I'm using the Tailwind CSS when rendering the "Content Script UI" in the Chrome browser plugin, and I'm finding that none of the css variables in it are taking effect. ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, I just want to say that I fully acknowledge why these exist - they're extremely useful and are necessary to support numerous features.
HOWEVER - they are quite problematic if you want to use Tailwind CSS for your emails (yes, it can work - and yes, it's possible). The issue is that many email clients will strip the offending CSS completely if it contains CSS variables. The reason for this is that they're simply not supported. Moreover, what ends up happening is that a client will remove not just the offending class - but ALL classes from the stylesheet, as a result. It makes it impossible to use tailwind CSS classes that contain variables, like colors.
Now, I've found out that we can disable certain core plugins, that use variables, like so:
This is fantastic, but I'm wondering if we could have something like "email mode", which basically strips any offending CSS generation from the build/generate step? This would make it much easier to get Tailwind CSS going for emails.
Beta Was this translation helpful? Give feedback.
All reactions