1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-11 16:44:44 +02:00

Minify_CSS: no longer mangles Tantek's Mid Pass Filter

This commit is contained in:
Steve Clay
2008-08-20 19:21:10 +00:00
parent 62d7c83d80
commit 0db6b60800
3 changed files with 15 additions and 1 deletions

View File

@@ -244,6 +244,14 @@ class Minify_CSS {
if ($m === 'keep') {
return '/*keep*/';
}
if ($m === '" "') {
// component of http://tantek.com/CSS/Examples/midpass.html
return '/*" "*/';
}
if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) {
// component of http://tantek.com/CSS/Examples/midpass.html
return '/*";}}/* */';
}
if (self::$_inHack) {
// inversion: feeding only to one browser
if (preg_match('@

View File

@@ -55,3 +55,8 @@ foo { /* filters for IE */
_height : 20px;
*height : 15px;
}
/* http://tantek.com/CSS/Examples/midpass.html */
@media tty {
i{content:"\";/*" "*/}} @import 'midpassafter.css'; /*";}
}/* */

View File

@@ -1,3 +1,4 @@
/*\*/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)}@media
screen{/*\*/* html
div#page{height:1%}/**/}foo{_height:20px;*height:15px}
div#page{height:1%}/**/}foo{_height:20px;*height:15px}@media
tty{i{content:"\";/*" "*/}}@import 'midpassafter.css';/*"}}/* */