mirror of
https://github.com/mrclay/minify.git
synced 2025-08-12 09:05:08 +02:00
Minify_CSS: no longer mangles Tantek's Mid Pass Filter
This commit is contained in:
@@ -244,6 +244,14 @@ class Minify_CSS {
|
|||||||
if ($m === 'keep') {
|
if ($m === 'keep') {
|
||||||
return '/*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) {
|
if (self::$_inHack) {
|
||||||
// inversion: feeding only to one browser
|
// inversion: feeding only to one browser
|
||||||
if (preg_match('@
|
if (preg_match('@
|
||||||
|
@@ -55,3 +55,8 @@ foo { /* filters for IE */
|
|||||||
_height : 20px;
|
_height : 20px;
|
||||||
*height : 15px;
|
*height : 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* http://tantek.com/CSS/Examples/midpass.html */
|
||||||
|
@media tty {
|
||||||
|
i{content:"\";/*" "*/}} @import 'midpassafter.css'; /*";}
|
||||||
|
}/* */
|
||||||
|
3
web/test/_test_files/css/hacks.min.css
vendored
3
web/test/_test_files/css/hacks.min.css
vendored
@@ -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
|
/*\*/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
|
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';/*"}}/* */
|
Reference in New Issue
Block a user