W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [css-overflow] computed value of overflow when overflow-x and -y are different

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 24 Nov 2014 12:56:35 -0800
Message-ID: <CAAWBYDBOxfJGpF4BZP5KQbp54OXoqsCOpLR53MvZWx9XTmq0OA@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: www-style list <www-style@w3.org>
On Mon, Nov 24, 2014 at 12:53 PM, Florian Rivoal <florian@rivoal.net> wrote:
>
>> On 24 Nov 2014, at 21:50, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>
>> On Mon, Nov 24, 2014 at 8:30 AM, Florian Rivoal <florian@rivoal.net> wrote:
>>> http://dev.w3.org/csswg/css-overflow-3/#overflow-properties
>>>
>>> For the computed value of ‘overflow’, the spec says "see individual properties”. However, that doesn’t help when the the computed values of individual overflow-x and overflow-y are different from each other, since overflow is a single valued property.
>>>
>>> A little bit of testing gives this:
>>> Chrome, Safari: auto
>>> Firefox, Presto: empty string
>>> IE: hidden+visible->visible, scroll+visible->scroll, auto+visible->visible
>>
>> Shorthands don't have computed values; they disappear during parsing.
>> The APIs that return a "computed value", like getComputedStyle,
>> actually return a string that, if re-assigned as style, will produce
>> the same computed value.  When this isn't possible, as is sometimes
>> the case with shorthands, the correct answer is to return the empty
>> string, as specified in
>> <http://dev.w3.org/csswg/cssom/#serializing-css-values>.
>
> Oops, sorry for missing that.
>
> My little investigation used getComputedStyle, so Firefox and Presto are doing the right thing, while Chrome, Safari and IE are making stuff up?

Yes.  They're not treating 'overflow' like a proper shorthand.

~TJ
Received on Monday, 24 November 2014 20:57:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC