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

Re: List item and marker box layout - Spec needs example / clarification for nested block scenario.

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 16 Mar 2008 15:53:16 -0700
To: Sushanth Rajasankar <Sushanth.Rajasankar@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <20080316225316.GA20033@ridley.dbaron.org>

On Sunday 2008-03-16 15:37 -0700, Sushanth Rajasankar wrote:
>     <style>
>     .LI { display:list-item; }
>     .OUT { list-style-position:outside; }
>     </style>
> </head>
> <body>
>     <ol class="OUT">
>         <span class="LI OUT">Item #1. Text Text Text Text Text Text</span>
>         <span class="LI OUT"><div style="border:10px solid green;">TEXT</div></span><!-- This is empty list item #2 -->
>         <span class="LI OUT">Item #3. Text Text Text Text Text Text</span>

Looking at this test case in browsers will test two different
 * HTML parsing behavior (whether DIV terminates SPAN, and how)
 * the issue you're discussing

It would be much better to test with a valid HTML testcase.

> The spec however clearly states :
> http://www.w3.org/TR/css3-lists/#markers

> Since the element matched by "::first-line" pseudo element is
> empty in my case, I would expect a blank line and that the div
> follows afterwards. This is not the observed behavior.

I think this interpretation of the spec is incorrect: ::first-line
can match a line that is also the first line of a child block.  I
believe the spec is explicitly saying that the marker *can* be
aligned with the first line of a child block, although I think
examples to make that clearer would be helpful.

I would also caution, however, that css3-lists is far from stable
and is not necessarily suitable for implementation.  In case of
disagreement with CSS 2.1, you should follow what CSS 2.1 says.


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Sunday, 16 March 2008 22:53:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:34 UTC