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

Re: [css3-lists] list-style-position behavior

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 12 May 2011 15:56:15 +0200
To: "www-style list" <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Message-ID: <op.vvdfn1pibunlto@oyvinds-desktop>
On Fri, 04 Feb 2011 22:48:08 +0100, Tab Atkins Jr. <jackalmage@gmail.com>  

> There are two distinct behaviors for list-style-position:outside
> between browsers.  One group (IE8, FF, Opera) positions the marker
> relative to the first line box in the list item.  This means that it
> cares about text-align, and will "follow" the text.  Another group
> (IE9, Webkit) positions the marker relative to the list item itself,
> so text-align is ignored.

I think this is too simplified, the actual behaviors seem rather more  
complicated/quirky and diverging than that. Try for instance horizontal  
padding, floats and text-indent (for which there is a test in the CSS 2.1  
testsuite, unlike text-align, apparently).

Also, positioning the marker relative to the line box does not make it  
"follow" the text when text-align changes, since the line box does not  
shrink to fit its contents.

> Since IE changed behavior, I suppose that means there's not a
> significant compat impact.  Is this true?
> Right now my plan is to spec the first (line-box-based) behavior as
> "list-style-position:hanging", and the second (list-item-based)
> behavior as "list-style-position:outside".

Sounds like it could be a pretty clean model, though it differs from  
previous suggestions (e.g. [1], [2]) and I don't have any insights as to  
compat impact.

The edit following this seems to have introduced more changes, though. For  
instance, for 'outside' it says that the marker of a list item in  
top-to-bottom block progression is aligned to the top edge (which one?).  
This doesn't sound particularly desirable, and the browsers I've tried all  
seem to connect the marker to a line box somehow and have it affect the  
line box height etc (as CSS 2.1 suggests may happen). Was it  
intentional/thought through?

I see the positioning stuff is marked as an issue, but I don't remember  
seeing it discussed here, so maybe people haven't looked at (this section  
of) the ED much.

[1] http://lists.w3.org/Archives/Public/www-style/2010Nov/0212.html
[2] http://lists.w3.org/Archives/Public/www-style/2010Mar/0419.html
Øyvind Stenhaug
Core Norway, Opera Software ASA
Received on Thursday, 12 May 2011 13:59:12 UTC

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