/**/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); } @media screen { /* for IE 5.x-6, hidden from IE 5 Mac */ /*\*/ * html div#page { height: 1%; } /**/ /* end hidden from IE 5 Mac */ } foo { /* filters for IE */ _height : 20px; *height : 15px; } /* http://tantek.com/CSS/Examples/midpass.html */ @media tty { 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;} EOS; // Make comments identifiable by adding "^*" to start and "$*" to end, // except for comment that come right after a ">" as those are probably // a hack (http://www.webdevout.net/css-hacks#in_css-selectors). // The regular expression for comments is a modified version of the one // found here: http://www.w3.org/TR/CSS21/syndata.html#tokenization. $contents = preg_replace('@(?)/\*([^*]*\*+([^/*][^*]*\*+)*)/@', '/*^*\1$*/', $contents); // Remove identifiers from ie-mac (both hide and feed) hack comments. $contents = preg_replace('@ /\*\^\*([^*]*\*+([^/*][^*]*\*+)*)(?<=\\\\\*)\$\*/ # A comment that ends with "\*$*/" ([^/]+)? # Anything between the two comments /\*\^\*([^*]*\*+([^/*][^*]*\*+)*)\$\*/ # The necessary comment afterwards @x', '/*${1}/${3}/*${4}/', $contents); // Remove comments that still contain our identifiers. $contents = preg_replace('@/\*\^\*[^*]*\*+([^/*][^*]*\*+)*\$\*/@', '', $contents); // Remove unnecessary whitespace. $contents = preg_replace('< (?:\s*([@{}:;,]|\)\s|\s\()\s*) # Whitespace around separators, but keep space around parentheses. | (?:(\*/)\s+(\s)) # Whitespace between and after comments. >x', '\1\2\3', $contents); // Remove unnecessary last ";" from rulesets. $contents = str_replace(';}', '}', $contents); // Leave at least 1 space between the first-letter and first-line pseudo elements and "{" // http://www.crankygeek.com/ie6pebug/ $contents = preg_replace('', 'first-\1 {', $contents); echo $contents; ?>