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

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
things:
 * 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.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Sunday, 16 March 2008 22:53:54 UTC