Re: [cssom] Defining getComputedStyle

On Fri, 12 Feb 2010 00:05:05 +0100, L. David Baron <dbaron@dbaron.org>  
wrote:
> On Thursday 2010-02-11 17:41 +0100, Anne van Kesteren wrote:
>> I don't. All I have is that browsers do not really agree. I could be
>> convinced to make these "exceptions" too. I do not really feel
>> strongly, though less exceptions seemed better.
>
> I agree that in general having fewer exceptions is better.  In this
> case, the path to having fewer exceptions means making larger
> changes (i.e., changing it for all elements rather than just
> display:none or inside-display:none elements) from what
> DOM-Level-2-Style said (which was unimplementable for the
> display:none case).

I'm not sure I understand. For most properties we can simply use the  
computed style definition of CSS 2.1. There's only a limited amount of  
properties that needs a more special definition and one property that  
always uses the used value (line-height).


>> >>Also it seems that overflow is not treated as a shorthand property.
>> >
>> >It's not a shorthand in CSS 2.1.
>>
>> Well, CSS doesn't have versions and most browsers have implemented
>> overflow-x and overflow-y. I guess either they all act independently
>> or overflow is just not considered a shorthand as far as the
>> getComputedStyle API is concerned.
>
> I think we need to move towards making shorthands "just work" so
> that there's no noticeable affect if a property changes from being a
> shorthand to a non-shorthand property, unless the value specified is
> one that can't be specified in the original (now shorthand) form.

Opera already does this. Works for me!


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Friday, 12 February 2010 08:02:30 UTC