RE: Expected overflow behavior for element with clip set?

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