문제

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