Re: setting css property to empty string from script

2009/3/6 Boris Zbarsky <bzbarsky@mit.edu>:
> Mike Wilson wrote:
>>
>> Is this behaviour specified by any standard, or is it just a
>> convention implemented by UAs?
>
> It looks like the latter.
> http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.html is the
> relevant spec, and it doesn't actually specify this behavior.  On the other
> hand, it doesn't really specify _any_ behavior for setProperty, if one looks
> carefully....  ;)

It also looks like that, according to future versions of CSSOM:

- If value is null or the empty string invoke removeProperty with
property as argument and abort this algorithm.

http://dev.w3.org/csswg/cssom/#cssstyledeclaration-setproperty

So, although it is not specified yet, it will be as soon as CSSOM is released.

> -Boris
>
>

Giovanni

Received on Friday, 6 March 2009 17:59:43 UTC