Question

I want to use media queries for the html emails I generate using jinja. The issue is that I am forced to put CSS inline for the emails for the CSS to be recognized, and media queries apparently cannot be put inline. Is there a good solution for this?

Was it helpful?

Solution

There's no good solution. You can put the media queries inside an <style> tag but we aware that gmail doesn't support them. Gmail requires all styles to be inline, this tool could be helpful

OTHER TIPS

CSS support varies greatly depending on which email client you are using. I would suggest having a look at The Ultimate Guide to CSS (please click "Download the poster" to get the full one). As you can see clients like Gmail are very limited in what they allow. AFAIK there is no solution for what you're trying to accomplish.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top