Вопрос

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?

Это было полезно?

Решение

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

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top