mirror of
https://github.com/mrclay/minify.git
synced 2025-08-08 07:06:49 +02:00
CSS/Compressor.php : fix Issue 95 + test
This commit is contained in:
@@ -147,7 +147,10 @@ class Minify_CSS_Compressor {
|
|||||||
\\s+
|
\\s+
|
||||||
/x'
|
/x'
|
||||||
,"$1\n", $css);
|
,"$1\n", $css);
|
||||||
|
|
||||||
|
// prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/
|
||||||
|
$css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css);
|
||||||
|
|
||||||
return trim($css);
|
return trim($css);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -60,3 +60,7 @@ foo { /* filters for IE */
|
|||||||
@media tty {
|
@media tty {
|
||||||
i{content:"\";/*" "*/}} @import 'midpassafter.css'; /*";}
|
i{content:"\";/*" "*/}} @import 'midpassafter.css'; /*";}
|
||||||
}/* */
|
}/* */
|
||||||
|
|
||||||
|
/* leave at least 1 space between these pseudo elements and "{" for IE6: http://www.crankygeek.com/ie6pebug/ */
|
||||||
|
p:first-letter {color:red;}
|
||||||
|
p:first-line {color:red;}
|
||||||
|
2
min_unit_tests/_test_files/css/hacks.min.css
vendored
2
min_unit_tests/_test_files/css/hacks.min.css
vendored
@@ -1,4 +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}@media
|
div#page{height:1%}/**/}foo{_height:20px;*height:15px}@media
|
||||||
tty{i{content:"\";/*" "*/}}@import 'midpassafter.css';/*"}}/* */
|
tty{i{content:"\";/*" "*/}}@import 'midpassafter.css';/*"}}/* */p:first-letter {color:red}p:first-line {color:red}
|
Reference in New Issue
Block a user