Re: when do transitions occur?

On 9/15/11 4:37 PM, Jennifer Yu wrote:
> Thanks for the responses Tab and David. I didn't realize that shorthands don't have a computed value since getComputedStyle seems to return a valid string for shorthands.

It really depends.  For this simple testcase:

   <!DOCTYPE html>
   <body style="background: fixed red;">
     <script>
       alert(getComputedStyle(document.body, "").background);
     </script>
   </body>

both Gecko and WebKit alert the empty string.  Gecko does this for all 
shorthands, in fact; arguably 
http://www.w3.org/TR/DOM-Level-2-Style/css.html calls for that behavior.

Of course getComputedStyle also doesn't actually return computed values, 
so using it to reason about computed values is pretty pointless....

-Boris

Received on Sunday, 18 September 2011 16:53:43 UTC