AF
1
Thunderbird and responsive emails / media queries
Hello guys,
I noticed that, since last Thunderbird releses (78.x for sure), the software removes media queries CSS.
I add a block like this:
<style type="text/css">
@media only screen and (max-width: 480px) {
[[CSS CODE]]
}
@media only screen and (min-width: 481px) {
[[CSS CODE]]
}
</style>
but on the received email I have only this:
<style type="text/css"></style>
Other CSS code blocks remain as they are.
Any one facing this "issue"? Any suggestion or solution?
Thank you very much :)
Alessandro
Yup I'm seeing this too.
I was on
78.3.0
and just updated to78.5.0
onMacOS 10.15.7
tested both versions, and both are removing media queries.Testing on Litmus media queries are supported
Thunderbird 60
onWindows 10
I've found a bit of a work around.
We can apply a media query directly to a
<style>
block.e.g.
<style media="screen and (max-width:480px)">
But some email clients will ignore the media attribute and apply it as a regular style even when the media condition isn't met.
So to only apply it to Thunderbird we can prefix our styles with
.moz-text-html
so the full fix looks likeThere is a bug for it filed here https://bugzilla.mozilla.org/show_bug.cgi?id=1679878
And a bit more info on why they did it here https://bugzilla.mozilla.org/show_bug.cgi?id=1530106#c60
Hello,
very interesting readings, it seems they are still deciding the default value of the config variable.
Let's see what happens
Thank you very much