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

Re: [cssom-view] Definition of scrollWidth doesn't seem to make sense

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 22 Jun 2012 17:04:05 +1200
Message-ID: <CAOp6jLakX41-HiMsZf6MEJqNpvVP0Jvux94QpDLM98eLbP1DuQ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
On Wed, Jan 18, 2012 at 6:28 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 1/17/12 12:26 PM, Boris Zbarsky wrote:
>
>> https://bugzilla.mozilla.org/**attachment.cgi?id=589081<https://bugzilla.mozilla.org/attachment.cgi?id=589081>shows 210 in all
>> modern browsers. Per the definition currently in the spec I _think_ it
>> should say 220, because that definition talks about adding up the
>> paddings and the "content width", but the content can (and in this case
>> does) overlap the paddings.
>>
>> I believe in this instance the spec is what's wrong, not the
>> implementations.
>>
>
> Oh, scrollHeight has the same issue, of course.
>

Actually the situation for scrollHeight is a little different. Webkit and
Opera place a scrollable element's bottom padding below the element's last
child, so bottom padding does get included in the scrollHeight even if the
last child overflows. (However, if the last child has its own child that
overflows, that grandchild will overlap the bottom padding.) IE9 and Gecko
place a scrollable element's bottom padding above the bottom border of the
element, so it never contributes to the scrolled content. This is more of a
how-to-render-'overflow' issue than a CSS OM issue.

Rob
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
Received on Friday, 22 June 2012 05:04:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT