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

options.removeStyleTags having no effect #32

Open
justo opened this issue Feb 26, 2016 · 2 comments
Open

options.removeStyleTags having no effect #32

justo opened this issue Feb 26, 2016 · 2 comments

Comments

@justo
Copy link

justo commented Feb 26, 2016

Setting {removeStyleTags: true} isn't removing empty style tags.

After inlining the CSS (which works as expected) all of the style blocks in <body> are emptied, but remain in the output:

<style></style>
@jonkemp
Copy link
Owner

jonkemp commented Feb 27, 2016

Can you provide more information, like the gulp task and the html and css files? This defaults to true, and the tests are passing.

@justo
Copy link
Author

justo commented Mar 1, 2016

Discovered that setting preserveMediaQueries to true prevents style tags from being removed even if they don't contain a media query (and removeStyleTags is true obviously). I encountered this while working on some html emails, where I kept style blocks close to the relevant markup. Many of them didn't contain media queries but the style tags didn't get removed.

I opened a pr on style data: jonkemp/style-data#4

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