Today I released a new major version of premailer where the only difference is that one of the default options have changed from True
to False
.
The git commit for this change might look big but the only difference is that now, by default, the HTML class
attribute is kept in the output HTML.
When premailer
started, the land of HTML emails was very different. Basically, you used to not use CSS media queries, so, no reason to keep the class
attribute. Now, these days, all pretty HTML emails need media queries and for that to work you need to have the class
attribute kept in the HTML.
So fear not the major version upgrade! If you used to use premailer
like this:
frompremailerimportPremailertransformer=Premailer(html)output_html=transformer.transform()
You now need to change it to:
frompremailerimportPremailertransformer=Premailer(html,remove_classes=True)output_html=transformer.transform()
As always, you can play with it on premailer.io.