Once CSS3 is finalized, update data.inc.php to include CSS3.

Comments

philbar’s picture

Status: Active » Postponed
Anonymous’s picture

any news on this? -webkit-* -moz-* stuff gets thrown out when running thru csstidy. like gradient/border radius et al. or is there a way to "preserve" certain portions of a stylesheet from being optimized?

philbar’s picture

Can you try this hack:

First, you'll need to edit the huge parse() method in csstidy.php. You'll have to add a condition to explictly tell CSSTidy not to discard -webkit-gradient and -moz-linear-gradient.

Just open your csstidy.php file, find the parse() method and locate the case 'instr' in the huge switch statement.

if (!($this->str_char === ')' && in_array($string{$i}, $GLOBALS['csstidy']['whitespace']) && !$this->str_in_str)) {
	$this->cur_string .= $temp_add;
} else {
	if ($this->sub_value=="-webkit-gradient" || $this->sub_value=="-moz-linear-gradient") {
		$this->cur_string.=' ';
	}
}

In bold, the else part to add. This will make sure your webkit and firefox gradient rules will get processed correctly.

I don't really understand WHY it work, but it does. The parse() method is a huge uncommented mess, it is quite difficult to understand it. There must be a better way, a more generic one than specifying some properties, but I didn't manage to come with anything better than that.

Fortunatly, the next part is cleaner.

http://www.pixelastic.com/blog/188:css3-gradients-with-csstidy

If it works, I add something similar to the project.

Anonymous’s picture

Hey,

I gave this a try but I did not succeed at getting it to work. I'll switch CSSTidy off for now and have a look at other compression methods, maybe solely Gzipped CSS.

philbar’s picture

Bummer. Well I created a new issue for this:
#863782: Support Browser Specific CSS

Let continue discussion on it there.