W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [cssom] Defining getComputedStyle

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 11 Feb 2010 18:14:53 +0100
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "CSS WG" <www-style@w3.org>
Message-ID: <op.u7y3i31o64w2qv@annevk-t60>
On Thu, 11 Feb 2010 18:00:43 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 2/11/10 11:41 AM, 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.
> Less exceptions is definitely better, as long as it doesn't break  
> existing content.  That "as long" is the issue.

I'm not sure how we'd get good data on this other than by shipping  
alpha/beta products. That WebKit does not them specially is a positive  
indicator, though of course there could be different code branches. (Opera  
is somewhat broken with regards to getComputedStyle. I have not taken its  
behavior into account when making decisions.)

>>> 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.
> This is going to be a general problem as various properties that are not  
> shorthands become shorthands (things like white-space for example).  Do  
> we just want to take it on a case-by-case basis, or try to figure out  
> how to handle it?

If we can figure something out that would be great.

> For what it's worth, the Gecko behavior for "overflow" is to return a  
> value if the x and y values are equal and to treat it as a shorthand  
> otherwise.

For overflow-x:visible; overflow-y:auto I get auto back as resolved value  
for overflow in Gecko. Though for a combination of hidden and visible I  
indeed get nothing.

I suppose something needs to be defined here after all.

What we could do is return values for all shorthand properties unless the  
individual properties make that impossible. E.g. border-color with four  
different colors does not fit in border. However this has the potential  
for breaking pages as well if they expect the empty string for some reason.

Anne van Kesteren
Received on Thursday, 11 February 2010 17:15:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:42 UTC