-
Notifications
You must be signed in to change notification settings - Fork 323
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
broken @ charset #86
Comments
The space happens to me as well but on Windows only. I wonder what do you mean with |
Shouldn't the minified file have |
As for the double quotes, the gain is negligible since only one charset declaration is allowed, but if it's easy can you add it? |
It does keep UTF-8 for me. Tested on node.js 0.8 and 0.10 on Windows and Mac. What version do you test on? What's the difference between single and double quotes? Both are one byte, right? |
You are right about the quotes, it was my misunderstanding.
On Windows 7. The minified file is UTF-8 but the |
I did some more testing and I have more info. The space after the Test case /*whatever*/
@charset "UTF-8";
/*whatever*/
blockquote small:before {
content: '\2014 \00A0';
} The weird issue with the This should be a smaller test case: @font-face {font-family: 'ProximaNova-Regular';src: url('/assets/thirdParty/css/1415F2_1.eot');src: url('/assets/thirdParty/css/1415F2_1IE.eot') format('embedded-opentype'),url('/assets/thirdParty/css/1415F2_1.woff') format('woff'),url('/assets/thirdParty/css/1415F2_1.ttf') format('truetype'),url('/assets/thirdParty/css/1415F2_1.svg') format('svg');font-style: normal;font-weight: normal;}
@charset "UTF-8";
/* (c) 2012 Instagram, Inc, */
blockquote small:before {
content: '\2014 \00A0';
} becomes @charset 'embedded-opentype';@font-face{font-family:ProximaNova-Regular;src:url(/assets/thirdParty/css/1415F2_1.eot);src:url(/assets/thirdParty/css/1415F2_1IE.eot) format('woff'),url(/assets/thirdParty/css/1415F2_1.woff) format('truetype'),url(/assets/thirdParty/css/1415F2_1.ttf) format('svg'),url(/assets/thirdParty/css/1415F2_1.svg) format("UTF-8");font-style:normal;font-weight:400}blockquote small:before{content:'\2014 \00A0'} |
It was because of wrong order of operations ( |
Np, thanks for fixing. But now there is an empty line with @charset "UTF-8";
.ui-helper-hidden{display:none} @charset "UTF-8"; .ui-helper-hidden{display:none} |
Ok, I'm on it. |
It seems to be fine now. Please close if it is. |
Still the same here... cmd /c cleancss bench/TP-demo.css -o bench/TP-demo-Clean-CSS.css --s0 -e --keep-line-breaks results in @charset "UTF-8";
.ui-helper-hidden{display:none} |
It should be fine now. Please remember to run against |
I always do The empty line is gone with cmd /c cleancss bench/TP-demo.css -o bench/TP-demo-Clean-CSS.css --s0 -e @charset "UTF-8"; .ui-helper-hidden{display:none} |
That's the third and the final fix as both transformations are fine now. It's 1.0 release time now. |
Now everything seems to be perfect. Thanks. |
Cool, thanks! |
BTW, this last patch fixes another stray space being left at the joining point of multiple css files like fancybox.css and then normalize.css with --s0. I suppose because of the special comments. |
Cool, it makes a lot of sense when looking at the last commit. |
Using the files from the /bench dir.
results in:
instead of
Notice the space after
@charset
.BTW, are the double quotes replaced with single quotes in the
@charset
declarations?The text was updated successfully, but these errors were encountered: