W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: root list item Re: [CSS21] 12.5 Lists

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 14 Mar 2011 10:02:57 -0700
Message-ID: <AANLkTi=pX2dJvxUAJ1ktRx6PpsD92=7_22BSeToHmxaD@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: Peter Moulder <peter.moulder@monash.edu>, Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
On Thu, Mar 3, 2011 at 4:54 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 09/07/2010 08:14 PM, Peter Moulder wrote:
>> One reason that root list-item displeases me is that it means that the box
>> tree
>> isn't actually a tree at all, but a forest.  Not a huge deal, but it
>> nevertheless seems like more cost than the uses I can see for root
>> list-items
>> (beyond what can be achieved with :before and/or a non-root list-item).
>
> Filed as Issue 231
>  http://wiki.csswg.org/spec/css2.1#issue-231

I don't particular care what the outcome is (and I'm fine with the
resolution that was adopted during the FtF), but I believe this
argument is wrong.

The argument is based on the assumption that the ::marker is, at least
sometimes, a sibling of the list-item rather than a child.  This is
presumably so that 'outside' markers will scroll and clip properly
when overflow is non-visible.

All browsers, however, appear to *always* treat the ::marker as a
child of the list-item.

Specifically, IE and Webkit position outside markers according to the
list-item's box, not the list-item's first line.  The markers is thus
outside of the list-item and invisible when overflow is hidden or
scroll.

Opera positions outside markers according to the list item's first
line, so you can make the marker move into the visible region of the
list-item using text-align.  If the marker is inside the visible
region of the list-item, it's shown no matter the ovrflow; if it's
outside, it's not.

Firefox appears to simply always hide the marker when overflow is
non-visible, even though it positions outside markers according to the
list-item's first line, and thus the marker *should* be inside the
visible area and visible.

IE's, Webkit's, and Opera's behaviors are all sane; they only differ
in their treatment of outside list items, which I have addressed by
adding the 'hanging' value to list-style-position.  Firefox's behavior
appears to just be crazy, so I'm ignoring it in Lists.

So, all browsers appear to treat markers as always being children of
list-items.  Thus, making the root element display:list-item does not
create a bush; there is still a single root box in the box tree.

~TJ
Received on Monday, 14 March 2011 17:03:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT