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

RE: Expected overflow behavior for element with clip set?

From: Rainer ┼hlfors <rahlfors@wildcatsoftware.net>
Date: Fri, 2 Mar 2007 10:24:07 -0700
To: "'Eli Friedman'" <sharparrow1@yahoo.com>, <www-style@w3.org>
Message-ID: <008901c75cef$95aa3ed0$6700a8c0@OUTDOORS.geartrade.com>

Initial value of 'overflow': 'visible'

The 'clip' property applies to elements that have a 'overflow' property with
a value other than 'visible'.

Not to mention the fact that you are defining a height and width for the
child element.

This is not a bug or a problem. It is a misinterpretation of the CSS
specification on your part, resulting in an incomplete and misleading test.

Rainer ┼hlfors

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
Of Eli Friedman
Sent: Wednesday, February 28, 2007 4:27 PM
To: www-style@w3.org
Subject: Expected overflow behavior for element with clip set?

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

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
Received on Friday, 2 March 2007 17:23:22 UTC

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