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

RE: Expected overflow behavior for element with clip set?

From: Eli Friedman <sharparrow1@yahoo.com>
Date: Fri, 2 Mar 2007 15:17:08 -0800 (PST)
To: rahlfors@wildcatsoftware.net
Cc: www-style@w3.org
Message-ID: <151461.62289.qm@web52108.mail.yahoo.com>

--- Rainer ┼hlfors <rahlfors@wildcatsoftware.net>
wrote:

> 
> In other words, there needs to be a distinction in
> the spec to indicate that
> the "invisible" portion of the content is not to
> behave as affected by
> "visibility: hidden", but rather as "overflow:
> hidden".

That basically sums it up.

> Not causing scroll when clipped seems reasonable
> enough. However, the
> question then becomes what should happen if you clip
> the top/left sides?
> 
> <style>
> .parent {overflow: auto; position: relative;
>          height: 100px; width: 100px}
> .child {background: blue; position: absolute;
>         clip: rect(50px, 100px, 100px, 50px);
>         width: 200px; height: 200px;}
> </style>
> <div class=parent>
>   <div class=child></div>
> </div>
> 
> Should the clipped box now be shifted to the left
> and up accordingly?

It should get treated the same way that other content
in scrolling contexts is treated.  Replace your
clipping changes with changes to top, left, width, and
height, and you run into the same issue.  The way
browsers have always dealt with scrolling areas is
that the starting view for a scrolling element is at
the origin of the scrolling element's coordinate
system.  So no, the box shouldn't be shifted left and
up.

-Eli


 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 
Received on Friday, 2 March 2007 23:17:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:49 GMT