[ 3 posts ]

Tim Berman

  • Username: u982744
  • Joined: Tue Mar 13, 2012 6:17 pm
  • Posts: 2
  • Offline
  • Profile
Tags:

error: *___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_521___*/

Post Posted: Tue Mar 13, 2012 8:00 pm
+0-
When compressing a CSS file I am getting an error in the resulting minified file. The minified file contains the string *___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_521___*/

I have put a copy of the original file and the minified version on a server so you can see.


original:
http://media.news.com.au/fe/tmp/yuicomp ... n-news.css

minified: (minified online at http://www.refresh-sf.com/yui/ which uses YUI Compressor 2.4.7)
http://media.news.com.au/fe/tmp/yuicomp ... nifier.css

Is there a fix for this error with YUI Compressor?

Tubal Martin

  • Username: tubalmartin
  • Joined: Mon Feb 02, 2009 4:59 am
  • Posts: 2
  • Offline
  • Profile
Tags:

Re: error: *___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_521___*/

Post Posted: Mon Mar 19, 2012 6:09 am
+1-
Hi,

The cause of your issue is you're using the * selector hack for IE right after a comment:

Code:
/*comment*/*width:auto;


YUI gets troubled with that, it's an issue for sure!

Until YUI fixes it (can take months or years) I suggest you add a space after any comment:

Code:
/*comment*/ *width:auto;


Or you can use my PHP port of the YUI compressor which fixes your issue. My port is well tested and it's being recently adopted by Minify, a popular framework for minifying resources.


Cheers,

Tim Berman

  • Username: u982744
  • Joined: Tue Mar 13, 2012 6:17 pm
  • Posts: 2
  • Offline
  • Profile

Re: error: *___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_521___*/

Post Posted: Mon Mar 19, 2012 3:41 pm
+0-
The workaround will work fine for our needs. Thanks for helping out with the annoying issue!

Tim
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum