What versions are you using? (if relevant)
[email protected], [email protected]
Describe the Bug
I use react email with tailwind config:
<Tailwind
config={{
presets: [pixelBasedPreset],
theme: {
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
},
extend: {
screens: {
print: { raw: 'print' },
},
},
},
}}
>
If i use print styles like:
<Section className="pb-3 md:pb-4">
<Img src={image} className="mx-auto print:invert" width="100%" />
</Section>
It generates media query with --tw variables which break Gmail parser and as result other media queries ignored by Gmail:
@media print{.print_invert{--tw-invert:invert(100%)!important;filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}}
Same problem if i use print border styles
<td align="center" valign="top"
className="bg-white text-black font-bold px-4 py-2 text-2xl md:text-xl text-center print:border-solid print:border print:border-gray-100">
and result
@media print{.print_border-solid{--tw-border-style:solid!important;border-style:solid!important}}
and it worked fine with prev tailwind version v3 and it generate only one style
.print_invert {
filter: invert(100%) !important
}
What is affected (leave empty if unsure)
Tailwind Component
Link to the code that reproduces this issue
Please have a look https://github.com/VeXell/test-react-email and export html
To Reproduce
Send test email from dev mode or send exported html directly
Expected Behavior
Expect code without tailwind variables when using pixelBasedPreset
What's your node version? (if relevant)
No response
What versions are you using? (if relevant)
[email protected], [email protected]
Describe the Bug
I use react email with tailwind config:
If i use print styles like:
It generates media query with
--twvariables which break Gmail parser and as result other media queries ignored by Gmail:Same problem if i use print border styles
and result
and it worked fine with prev tailwind version v3 and it generate only one style
What is affected (leave empty if unsure)
Tailwind Component
Link to the code that reproduces this issue
Please have a look https://github.com/VeXell/test-react-email and export html
To Reproduce
Send test email from dev mode or send exported html directly
Expected Behavior
Expect code without tailwind variables when using
pixelBasedPresetWhat's your node version? (if relevant)
No response