W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [CSSOM] Behavior of setting .style.foo to null

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Tue, 28 Aug 2012 14:57:40 -0700
Message-ID: <CABZUbM0ro5UuemutO2n-J3w_=TJ2f9B-hBfunVWfyjN8hX_Gtg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On 8/28/12, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Aug 28, 2012 at 2:05 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> Consider this testcase:
>>
>>   <style>
>>     body { color: green; }
>>   </style>
>>   <body>
>>     Some text
>>     <script>
>>       document.body.style.color = "red";
>>       document.body.style.color = null;
>>     </script>
>>   </body>
>>
>> This renders the text green in WebKit and Presto and shipping Gecko,
>> which
>> all seem to treat null as empty string here.  It renders the text red in
>> Trident, which seems to treat null as "null" here.
>>
[...]

> I'd prefer nulling it to remove the declaration, personally.  Weight
> of compatibility favors that, it seems.
>
Boris said what happens in two different cases. No declaration is
removed. In either case, the value of the color property... Ah,
neverrmind. It was said well enough the first time.
-- 
Garrett
Twitter: @xkit
personx.tumblr.com
Received on Tuesday, 28 August 2012 21:58:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT