Re: overflow and list-items

On Jul 21, 2008, at 7:55 PM, Arron Eicholz wrote:

>
>> When a 'li' element or any element set to 'display: list-item' has
>> a setting for 'overflow' other than 'visible' what should happen to
>> the marker box when it is set to 'list-style-position: outside'?
>>
>> Should the marker be visible?
>>
>> Should the marker scroll with the first text item even though the
>> marker is not inside of the scrollable region?
>
> Testcases:
> http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0050/list-item-overflow-scroll.htm
> http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0050/list-item-overflow-visible.htm
> http://lists.w3.org/Archives/Public/www-archive/2008Jul/att-0050/list-item-overflow-hidden.htm
>
> Opera, Safari, and Firefox do not display the marker. However IE7  
> does.
> We think it makes more sense to display the marker, so we propose the
> following:
>
>  Add to definition of 'outside':
>   | 'overflow' on the element does not clip the marker box.
>   | The marker box is fixed with respect to the principal block
>   | box's border and does not scroll with the principal block
>   | box's content.

I strongly disagree with this conclusion.  The marker is still  
conceptually part of the contents of the list item, and the rules for  
clipping are quite clear.  In order to special case this, you would  
have to specify a unique position for when outside list markers render  
in the stacking order (Appendix E).  A sentence in Appendix E also  
seems to contradict your conclusion:

"For example, an outside list marker comes before an adjoining  
':before' box in the line box, which comes before the content of the  
box, and so forth."

In WebKit an outside list marker is actually in the line box so that  
it can affect the height of the line.  It is simply translated such  
that its x position is offset to an outside position.

If the marker has to be rendered before the clip is even applied, you  
are raising a bunch of other questions at the same time.  For example  
is the marker affected by opacity?  If so you've created an implicit  
order between when opacity is applied and when overflow is applied.   
(Opacity would have to be applied first.)

If the marker has to render before clipping is applied, then it has to  
render at a different position in the stacking order than I think most  
browsers are used to.

I think it makes more sense not to special case the marker and to have  
it respect the overflow rules like everything else does.

dave
(hyatt@apple.com)

Received on Tuesday, 22 July 2008 21:13:19 UTC