[ 1 post ]

Ken Jackson

  • Username: wkj119
  • Joined: Thu May 24, 2012 8:48 pm
  • Posts: 1
  • Offline
  • Profile
Tags:

css compression behaves differently than Chrome

Post Posted: Thu May 24, 2012 9:18 pm
+0-
In chrome, compressing the following css results in different styles being applied vs using the uncompressed css. This occurs with the YUI compressor version 2.4.7.

The uncompressed css is:

Code:
/*\*/* #primaryContent{font-size: xx-large}

/**/

.pdp #primaryContent{background-color:white}


The YUI css compressor compresses this to

Code:
 
/*\*/**/.pdp #primaryContent{background-color:white}


Note that part of the css is removed apparently because the YUI compressor thinks it is part of a
comment. The "/*\*/**/.pdp part that is left is not applied to the #primaryContent div so the background-color is not set to white.


But Chrome seems to interprets this css differently with the uncompressed css - more like the following:

Code:
#primaryContent{font-size: xx-large}
.pdp #primaryContent{background-color:white}


which does apply the white background.
  [ 1 post ]
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