W3C home > Mailing lists > Public > www-style@w3.org > March 2007

Expected overflow behavior for element with clip set?

From: Eli Friedman <sharparrow1@yahoo.com>
Date: Thu, 1 Mar 2007 10:14:02 -0800 (PST)
To: www-style@w3.org
Message-ID: <556518.24693.qm@web52110.mail.yahoo.com>

(Resending because it apparently got lost the first

Given the following HTML:
..parent {overflow: auto; position: relative;
         height: 100px; width: 100px}
..child {background: blue; position: absolute;
        clip: rect(0pt, 50px, 50px, 0pt);
        width: 200px; height: 200px;}
<div class=parent>
  <div class=child></div>

Is the browser expected to show scrollbars (or
whatever equivalent scrolling mechanism)?

Every browser on my computer (Opera 9, IE 6, Firefox)
shows scrollbars in this situation.  However, there
isn't actually anything there because it's been
clipped out.

I've written a patch for Firefox that changes the
behavior to only show a scrolling mechanism if there
is visible content to scroll to.  This changes the
behavior so that scrollbars no longer appear on my
testcase above.  This seems like a much more
appropriate interpretation of the specification, but
I'm not sure if there's anything else I need to
consider.  Comments?

for my patch.)

-Eli Friedman

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
Received on Thursday, 1 March 2007 21:25:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC