1
0
mirror of https://github.com/mrclay/minify.git synced 2025-02-21 07:22:26 +01:00

+ BMH and MSIE filters to css/hacks.css. Minify_CSS no longer minifies RGB colors in MSIE filters.

This commit is contained in:
Steve Clay 2008-05-14 16:15:09 +00:00
parent 1c1a6f327d
commit e9035109c9
3 changed files with 22 additions and 9 deletions

View File

@ -126,8 +126,8 @@ class Minify_CSS {
,array('Minify_CSS', '_selectorsCB'), $css);
// minimize hex colors
$css = preg_replace('/#([a-f\\d])\\1([a-f\\d])\\2([a-f\\d])\\3([\\s;\\}])/i'
, '#$1$2$3$4', $css);
$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
, '$1#$2$3$4$5', $css);
$rewrite = false;
if (isset($options['prependRelativePath'])) {

View File

@ -2,30 +2,43 @@
.foo {color:red}
/* necessary comment */
/* comment */
/* comment to attempt to confuse parser */
/* feed to ie5/mac \*//*/
@import "ie5mac.css";
/* necessary comment */
/* comment */
/* comment to attempt to confuse parser */
/*/ hide from nav4 */
.foo {display:block;}
/* necessary comment */
/* comment */
/* comment to attempt to confuse parser */
/*/ feed to nav *//*/
.foo {display:crazy;}
/* necessary comment */
/* comment */
/* hide props from various IE/win */
div {
width: 140px;
width/* */:/**/100px;
width: /**/100px;
}
html>/**/body {}
html>/**/body {}
/* Tantek's box model hack */
div {
width:400px;
voice-family: "\"}\"";
voice-family:inherit;
width:300px;
}
/* don't minimize hex colors in filters */
div {
filter:chroma(color=#aabbcc);
filter:mask(color=#000000) shadow(color=#9BAD71, direction=135) chroma(color=#000000);
}

View File

@ -1 +1 @@
/*\*/a{}.foo{color:red}/**//*\*//*/@import "ie5mac.css";/**//*/*/.foo{display:block}/**//*/*//*/.foo{display:crazy}/**/div{width:140px;width/**/:/**/100px;width:/**/100px}html>/**/body{}
/*\*/a{}.foo{color:red}/**//*\*//*/@import "ie5mac.css";/**//*/*/.foo{display:block}/**//*/*//*/.foo{display:crazy}/**/div{width:140px;width/**/:/**/100px;width:/**/100px}html>/**/body{}div{width:400px;voice-family: "\"}\"";voice-family:inherit;width:300px}div{filter:chroma(color=#aabbcc);filter:mask(color=#000000) shadow(color=#9BAD71, direction=135) chroma(color=#000000)}