gulp-inline-css
gulp-inline-css copied to clipboard
options.removeStyleTags having no effect
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>
Can you provide more information, like the gulp task and the html and css files? This defaults to true, and the tests are passing.
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: https://github.com/jonkemp/style-data/pull/4