RE: Malformed declarations incorrectly parsed?

Now you all are confusing me <grin> ...

I should think with 

p { color:red; color:; color:green }

That the UA should report "color:red", especially because of the statement:

"Lexical errors are handled with a skip to matching brace"


It was always my understanding that the UA should read the styles up to the
point it first comes across an error. From that point on everything else
should be ignored up to the matching brace.

I have always applied that rule to create browser-specific rules. For
example, in years past I might have written:

p { color:red; cursor:pointer; cursor:hand}

with the understanding that standards-compliant browsers would see the
"cursor:pointer" and ignore the rest of the line; whereas as IE 5 would see
the "cursor:hand" and, being the last style applied, use that style instead.

Your (Benjamin's) statement was:

"Yes, I know compliant implementations should read color: green; from that
input."

So, now I'm confused.

I should think the compliant implementations would see "color:red" as valid,
see "color:;" as NOT valid and therefore just skip to the matching brace --
ignoring that invalid declaration AND ignoring the "color:green."

Please explain...

--Doug

Received on Wednesday, 19 March 2008 13:51:14 UTC