Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Premailer strips important tags from stylesheets meant to be ignored #241

Open
chaitanyagupta opened this issue Dec 31, 2019 · 2 comments
Open

Comments

@chaitanyagupta
Copy link

I am using premailer 3.6.1. I noticed that !important is stripped out even from stylesheets that are meant to be ignored:

premailer.transform('<html><head><style data-premailer="ignore">.wrapper { width: 100% !important; }</style><body></body></html>')
'<html><head><style>.wrapper { width: 100%; }</style></head><body></body></html>'

When I set strip_important=False, it is not stripped out as expected. But I don't think this should be required in a stylesheet that premailer is supposed to ignore.

@peterbe
Copy link
Owner

peterbe commented Dec 31, 2019

Makes sense. Do you think you can add a unit test and a fix for it?

@chaitanyagupta
Copy link
Author

I will try to do this sometime soon. At the moment, strip_important=False workaround works well enough for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants