Premailer 3.0.0 - classes kept by default

07 June 2016   0 comments   Python, Web development

Powered by Fusion×

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:

from premailer import Premailer

transformer = Premailer(html)
output_html = transformer.transform()

You now need to change it to:

from premailer import Premailer

transformer = Premailer(html, remove_classes=True)
output_html = transformer.transform()

As always, you can play with it on premailer.io.

Comments

Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
CSS Bloat Comparison 03 June 2016
Next:
json-schema-reducer 02 August 2016
Related by Keyword:
Premailer.io 08 July 2015
premailer 2.9.0 and new rules for `base_url` 11 May 2015
Premailer on Python 3 08 October 2014
premailer now with 100% test coverage 22 August 2014
COPYFILE_DISABLE and python distutils in python 2.6 12 April 2014
Related by Text:
premailer now excludes pseudo selectors by default 27 May 2013
How to use premailer as a command line script 13 July 2012
How and why to use django-mongokit (aka. Django to MongoDB) 08 March 2010
How to no-mincss links with django-pipeline 03 February 2016
premailer now honours specificity 21 March 2013