jgallen23 / grunt-inline-css

Grunt task for turning an html file with linked css to inline css. Great for emails.
MIT License
195 stars 33 forks source link

Removing !important tags #24

Closed Ethanhackett closed 7 years ago

Ethanhackett commented 9 years ago

It appears that during the inline process all of the !important tags are getting stripped out of inline.

mzgajner commented 9 years ago

Yup, Juice does this, and it's bad, because this is important for some older email clients.

But the good news is they added an option for this (preserveImportant: true) in version 1.3.0. So basically, you just have to bump the juice version in package.json to the latest one and specify the aforementioned option.

EDIT: Added a PR with this version change.

blacksun1 commented 7 years ago

HI,

Juice has been upgraded to 3.0.1 in master and I've added tests to check that !important is not being stripped when using the Juice preserveImportant: true option.

Regards,