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:41:52 +1200
Message-ID: <CAOp6jLZOiekSr0nF0EPTVrj+_=TrCyXFogBv_2YNz6mhrUpU3A@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
On Fri, Jun 22, 2012 at 5:04 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> 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.
>

Then again, given this testcase:
<!DOCTYPE HTML>
<div style="width:200px; height:100px; padding-bottom:100px;
overflow-y:scroll; border:1px solid black; background:orange;
background-clip:content-box;">
  <div style="height:200px; width:100px; background:yellow"></div>
</div>
Webkit and Opera render the orange content-box just 100px high, so it's not
clear where they think the bottom-padding is. It's just looks like a bug
that they can scroll vertically in that testcase.

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:42:25 GMT

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