Re: z-index of scrollbars

Giovanni Campagna wrote:
> 2009/2/26 Robert O'Callahan <robert@ocallahan.org>:
>> Somewhere the spec should mention that when the UA displays a scrolling
>> mechanism for 'overflow:auto' or 'overflow:scroll' elements, the scrolling
>> mechanism should be drawn just above any background and borders of the
>> element. (Opera, Webkit and IE8 'standards mode' already do this, and Gecko
>> will after 1.9.1/FF3.1).
> Shouldn't be it instead in the same pseudo-stacking-context of
> non-positioned non-floated *content*?
> 
> I expect that the same reasons for non atomical drawing of backgrounds
> and borders require the scrolling mechanism (when one is needed, ie
> only for overflow-style: scrollbar or pager) to be always with
> content: if content is available, scrollbars should be.

I'm not convinced that this is a concern in this case.  Although it's 
more UA-centric behaviour than CSS behaviour, overflow divs can be 
scrolled independently of the scrollbars either by using the keyboard to 
tab to the div then using the arrow keys to scroll, or, provided that at 
least some content within some dependant ("descendant") box of the 
overflow:scroll div D is not overlapped by whatever it is that is 
overlapping the scrollbar, by using the mouse to select that content and 
drag in the desired direction.

Moreover, I don't think that the argument holds much weight, because 
even if the scrollbar were painted on the same layer as non-positioned 
in-flow inlines as suggested, it would still be painted in document tree 
order; hence any subsequent content on that same layer could still 
overlap the scrollbar and prevent direct manipulation.

[Although it probably goes without saying, I note that dependants 
("descendants") of the overflow:scroll div D can never themselves escape 
its padding area to intersect the scrollbar, by definition of 
overflow:auto/scroll.  Hence overlap originates from other elements, not 
from D or its dependants.]

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Thursday, 26 February 2009 19:10:16 UTC