Open GoogleCodeExporter opened 9 years ago
In other words (simplified):
find: }*{}
replace: }
Original comment by cerieljacobs@gmail.com
on 3 Nov 2010 at 1:37
Sounds good to me.
This might be safe near the end of processing:
$css = preg_replace('/}[^\/}]+{}/', '}', $css);
That is, remove the selection only if the area between } and {:
* has no "/" (probably the start of a preserved comment)
* has no "}" (this could be near/in a media block)
TODO:
Add tests to /min_unit_tests/_test_files/css/styles.css
Add expectation to /min_unit_tests/_test_files/css/styles.min.css
Add code at line 153 of /min/lib/Minify/CSS/Compressor.php#153
Feel free to submit patches :)
Original comment by mrclay....@gmail.com
on 3 Nov 2010 at 2:50
Original issue reported on code.google.com by
cerieljacobs@gmail.com
on 3 Nov 2010 at 1:33