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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 28 Aug 2012 14:44:51 -0700
Message-ID: <CAAWBYDDQ6Lmd782kGwKvM04Vhh4YqmfvYpFY=yn1a6dQNRdEsw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style list <www-style@w3.org>
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.
> My initial WebIDL implementation for Gecko matches Trident, since that's the
> default WebIDL behavior for null.
> Which behavior do we want here?  Is Trident willing to change to match the
> others?  Are WebKit and Presto willing to change to match Trident? I'd
> rather make a behavior change here only once, not twice, so it would be good
> to come to an agreement on what the desired behavior is.

I'd prefer nulling it to remove the declaration, personally.  Weight
of compatibility favors that, it seems.

Received on Tuesday, 28 August 2012 21:45:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:35:14 UTC