-
Notifications
You must be signed in to change notification settings - Fork 29
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
preserveMediaQueries not being picked up? #23
Comments
https://github.com/jonkemp/gulp-inline-css#optionspreservemediaqueries |
Yep, tried that one, doesn't seem to change anything. Any other ideas? |
Could you provide more information? Also, could you update your example because it shows that you have |
Perhaps you could have a quick look (https://cloudup.com/cup_ZRdpO5G). Just |
One thing is you are missing some node modules in the package.json,
but I am seeing the same problem. I'll look into it. |
Ah, yeah, sorry about the missing modules. Was cleaning things up, and cleaned a bit too much. Looking forward to see if you have figure out why the issue persists |
Hey @jonkemp sorry to bother, any word on this? |
No, I don't really understand what is wrong. The tests pass so I know it works to some extent. Sorry. |
I have the same problem. It is my config: gulp.task('buildError', function() {
gulp.src('error_pages/*.html')
.pipe(inlineCss({
removeStyleTags: true,
removeLinkTags: true,
preserveMediaQueries: true,
debug: true
}))
.pipe(gulp.dest('dist/'));
}); When I run task |
@jonkemp The version in github (3.0.0) doesn't seem to match npm (2.0.0)? I know 3.0.0 is just three days old, but maybe there's some diff in what we're getting from npm and from what you're running yourself so that's why this isn't working for us? |
The version of this plugin is 3.0 on npm. https://www.npmjs.com/package/gulp-inline-css Maybe you are getting the gulp plugin confused with the actual node module is uses? |
The readme seems to have been updated after the 3.0.0 tag. |
You are correct. The README was changed after it was published to npm |
Either way, I've tried both 2.0.0 and 3.0.0 but neither keeps the media queries. Btw, SemVer usually means that a major bump (2 -> 3) means breaking changes, but I can't see any? |
The breaking change is that the inline-css module was updated to use Promises. I bumped the version because I was afraid that may cause some issues. |
Ah ok, so the interface remains unbroken? I tried running your tests and yes they pass, but I can't find the test for media queries? |
You need to look at https://github.com/jonkemp/inline-css. The gulp plugin doesn't do anything except handle the streams and pass the files to the inline-css module. |
@jonkemp Thanks. I opened an issue there. @oskarkrawczyk since your CSS was originally SASS I'm assuming you were including the CSS with a regular |
For anyone still getting stuck on this issue, I thought I would post a simple work around until this is fixed. You make sure the css is added the the html before inlining the css. You can do something like this:
There are other gulps than smoosher, thats just happens to be the one I used 😎 |
|
Hi,
Spent the last hour trying to figure out why
preserveMediaQueries
is not being picked up.Are there any known issues that make this option unusable?
The code is pretty straightforward:
CSS (compiled from SCSS):
tables == email ;-)
Taks config:
There's nothing weird here.
I'm really running out of ideas. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: