Lasse Reichstein Nielsen wrote:[color=blue]
> Richard Cornford writes:
>[color=green]
>> The CSS specification requires that unknown/unrecognised
>> properties and value be ignored. This is generally a good
>> idea as it allows newer features to be added and not cause
>> problems for older implementations.[/color]
>
> The CSS specification is for CSS content, not setting via
> Javascript. The relevant standard for that is the W3C DOM
> Level 2 Style specification, in this case the setProperty
> method on the CSSStyleDeclaration interface.
><URL:
http://www.w3.org/TR/DOM-Level-2-Sty...CSSStyleDeclar[/color]
ation>[color=blue]
>
> According to specification, the setProperty method is
> expected to throw a DOMException if the value to set "has
> a syntax error and is unparsable". Whether that includes
> "somewhat parsable but meaningless" is not elaborated, but
> I wouldn't fault a browser for throwing an exception on
> any illegal value.[/color]
But wouldn't that be "has a syntax error and is unparsable" by CSS
standards? And an unknown/unrecognised value (so long as it is not a
syntax error; contains a colon or some such) can be parsed, just as it
would be in a style sheet.
Richard.