W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: overflow and list-items

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 29 Jul 2008 18:59:12 -0700
Message-ID: <488FCAF0.1000503@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>

Ian Hickson wrote:
> On Fri, 4 Apr 2008, 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'?
> 
> Assuming that it falls outside the overflow box, it should disappear. The 
> marker is part of the (first) line box of the list-item box. It should act 
> exactly like any inline element on that line, just rendered flush with the 
> start of the line box.
> 
> I wrote some prose on how this is supposed to work back in the 2002 
> timeframe:
> 
>    http://www.w3.org/Style/Group/css3-src/css3-lists/#markers
> 
> ...the latest version of which is here:
> 
>    http://cgi.w3.org/member-bin/process.cgi?method=url&url=http%3A%2F%2Fwww.damowmow.com%2Ftemp%2Fcsswg%2Flists%2Fcurrent%2Flists.src&output=html#model
> 
> It needs more work before we can call it a real spec, though.

I agree the marker should participate in the principal block box's first
line's layout. But my take on your spec is that an 'outside' marker is
a sibling of its superior parent, not a child.

   # In the 'inside' positioning model, the ::marker  pseudo-element is
   # placed at the beginning of the first line box of the principal
   # block box. This will typically cause the first character of the
   # marker to match the element's ::first-letter  pseudo-element.

cmp

   # If the elements' 'list-style-position' property has the value
   # outside, then the value of the element's ::marker pseudo-element's
   # 'content' property is formatted in an independent marker box,
   # outside the principal box.            ^^^^^^^^^^^^^^^^^^^^^^^
     ^^^^^^^^^^^^^^^^^^^^^^^^^
   # ... The marker box will be vertically aligned with the first line of
   # content in the principal box, as specified by the pseudo-element's
   # 'vertical-align' property. (The principal box is the main one
   # generated for the element with its 'display' property set to
   # list-item, as opposed to the marker box.) The marker box participates
   # in the height calculations of the principal box's first line box.
   # Thus, markers are aligned with the first line of an element's content.

Specifically, saying that ::marker is an "independent marker box,
outside the principal box" seems to strongly indicate that this
would be the case. And the difference in wording about how the
::marker box interacts with other content in the first line box
seems to indicate that there's a difference between 'inside',
which is treated as a child of the principal block box and whose
interactions with the first line content falls out from that;
and 'outside,  which participates in the line's layout but whose
interactions with that content are called out specially.

The marker box of course still inherits from its superior parent
in both cases, as all pseudo-elements do in your Generated Content
spec.


As for the CSS2.1 spec, it simply says
   # The marker box is outside the principal block box.
which can reasonably be interpreted in this way as well.

I think displaying the marker makes the most sense from an authoring
perspective. Treating the marker as the principal block box's child
and clipping it is neither useful nor intuitive.

~fantasai
Received on Wednesday, 30 July 2008 01:59:53 GMT

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