-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
LESS minifier breaking media queries on possible comment parse #1349
Comments
Looks to be a bug in ycssmin - if you just use the basic compressor then you don't get any problem |
both ycssmin and cssmin which we used before that don't seem to be getting alot of development. https://npmjs.org/package/clean-css looks like it does.. we should consider switching. @jonschlinkert @matthew-dean do you know of any other node css minifiers and have any preferences? |
related: #1080 |
clean css also has a issue - clean-css/clean-css#117 |
It's fixed in clean-css 1.0.11. It was related to escaping new line breaks. Enjoy :) |
Posted this initially on the PrePros issues, https://github.com/sbspk/Prepros/issues/55
Problem persisted when minifying compiled LESS file with native LESS minifier with PrePros 1.5 on Windows 7 64-bit. Confirmed this same problem in Codekit's use of the LESS minifer (YUI compression) on Mac OSx 10.8.
EDIT: Possibly related issue #284
Noticed this in Chrome Version 27.0.1453.94m however it doesn't seem to affect FF 21, not sure about others.
This is a default media query definition per
main.css
- line 223 in the HTML5 Boilerplate template.When compressing the above LESS/CSS, the minified source breaks resulting in the following result:
@media print,(-o-min-device-pixel-ratio:5/@media only print{a,a:visited{text-decoration:
Looks like the minifier has an issue with
/
chars in@media
definitions and I'm assuming treats it as a delimiter for a comment.This particular issue causes
@media
scope to bleed into myonly print
media query, so my print styles are shown regardless of which media mode is enabled when my compressed CSS file is being used.The text was updated successfully, but these errors were encountered: