cssmin icon indicating copy to clipboard operation
cssmin copied to clipboard

IE7/IE8 bug regarding compressing hex colors and removing too much whitespace

Open rantler opened this issue 15 years ago • 3 comments

I had to change this line:

css.gsub!(/([^"'=\s])\s*#([0-9a-f])\2([0-9a-f])\3([0-9a-f])\4/i, '\1#\2\3\4')

To read:

css.gsub!(/([^"'=\s])\s*#([0-9a-f])\2([0-9a-f])\3([0-9a-f])\4/i, '\1 #\2\3\4')

In order to fix an IE7 and IE8 issue regarding border colors disappearing.

rantler avatar Mar 16 '11 20:03 rantler

Here is the before/after of what IE didn't like:

BEFORE: border-bottom: 1px solid #dddddd;

AFTER: border-bottom: 1px solid#ddd;

rantler avatar Mar 16 '11 20:03 rantler

Can you post an example of some CSS that was affected by this?

rgrove avatar Mar 16 '11 20:03 rgrove

Heh, you beat me to it. Thanks!

rgrove avatar Mar 16 '11 20:03 rgrove