This project is archived and is in readonly mode.

#416 ✓wontfix
Daniel Steigerwald

Fix for Fx.CSS parse method

Reported by Daniel Steigerwald | October 11th, 2008 @ 03:56 AM | in 2.0 (closed)

Narrative explanation:

Once upon of time, I had to clip some beautiful image. Just because I like smoothness everywhere, I had to use Fx...

Short: parse can't parse clip.

Fix:


//parses a value into an array

parse: function(value){
	value = $lambda(value)(); // what is it?
	if (typeof value == 'string') {
		// stupid fix for value == rect(@px @px @px @px)
		value = value.replace('rect(', '').replace(')', '').split(' ');
	}
	else {
		value = $splat(value);
	}
	return value.map(function(val){
		val = String(val);
		var found = false;
		Fx.CSS.Parsers.each(function(parser, key){
			if (found) return;
			var parsed = parser.parse(val);
			if ($chk(parsed)) found = {value: parsed, parser: parser};
		});
		found = found || {value: val, parser: Fx.CSS.Parsers.String};
		return found;
	});
}

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Referenced by

Pages