W3C home > Mailing lists > Public > www-style@w3.org > February 2009

Re: z-index of scrollbars

From: Anton Prowse <prowse@moonhenge.net>
Date: Thu, 26 Feb 2009 20:09:26 +0100
Message-ID: <49A6E8E6.1050204@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
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.]

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:24 UTC