mirror of
https://github.com/mrclay/minify.git
synced 2025-08-16 19:14:01 +02:00
+ BMH and MSIE filters to css/hacks.css. Minify_CSS no longer minifies RGB colors in MSIE filters.
This commit is contained in:
@@ -126,8 +126,8 @@ class Minify_CSS {
|
|||||||
,array('Minify_CSS', '_selectorsCB'), $css);
|
,array('Minify_CSS', '_selectorsCB'), $css);
|
||||||
|
|
||||||
// minimize hex colors
|
// minimize hex colors
|
||||||
$css = preg_replace('/#([a-f\\d])\\1([a-f\\d])\\2([a-f\\d])\\3([\\s;\\}])/i'
|
$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
|
||||||
, '#$1$2$3$4', $css);
|
, '$1#$2$3$4$5', $css);
|
||||||
|
|
||||||
$rewrite = false;
|
$rewrite = false;
|
||||||
if (isset($options['prependRelativePath'])) {
|
if (isset($options['prependRelativePath'])) {
|
||||||
|
@@ -2,30 +2,43 @@
|
|||||||
.foo {color:red}
|
.foo {color:red}
|
||||||
/* necessary comment */
|
/* necessary comment */
|
||||||
|
|
||||||
/* comment */
|
/* comment to attempt to confuse parser */
|
||||||
|
|
||||||
/* feed to ie5/mac \*//*/
|
/* feed to ie5/mac \*//*/
|
||||||
@import "ie5mac.css";
|
@import "ie5mac.css";
|
||||||
/* necessary comment */
|
/* necessary comment */
|
||||||
|
|
||||||
/* comment */
|
/* comment to attempt to confuse parser */
|
||||||
|
|
||||||
/*/ hide from nav4 */
|
/*/ hide from nav4 */
|
||||||
.foo {display:block;}
|
.foo {display:block;}
|
||||||
/* necessary comment */
|
/* necessary comment */
|
||||||
|
|
||||||
/* comment */
|
/* comment to attempt to confuse parser */
|
||||||
|
|
||||||
/*/ feed to nav *//*/
|
/*/ feed to nav *//*/
|
||||||
.foo {display:crazy;}
|
.foo {display:crazy;}
|
||||||
/* necessary comment */
|
/* necessary comment */
|
||||||
|
|
||||||
/* comment */
|
/* hide props from various IE/win */
|
||||||
|
|
||||||
div {
|
div {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
width/* */:/**/100px;
|
width/* */:/**/100px;
|
||||||
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);
|
||||||
|
}
|
2
web/test/_test_files/css/hacks.min.css
vendored
2
web/test/_test_files/css/hacks.min.css
vendored
@@ -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)}
|
Reference in New Issue
Block a user