Re: list-style-position and text-align

On Nov 23, 2010, at 12:07 AM, Boris Zbarsky wrote:

> 
> I'm having trouble telling what webkit is actually doing based on this testcase:
> 
> <body>
>  <ul style="list-style-position: inside">
>    <li>
>      <ul>
>        <li>
>          <div style="">aaa</div>
> </body>
> 
> It seems like the outer bullet is placed on a line by itself but the inner is not, right?
> 

Watch out for quirks mode.  Go to strict mode, and the bullets will be on the same line.

<!doctype html>
<body>
 <ul style="list-style-position: inside">
   <li>
     <ul>
       <li>
         <div style="">aaa</div>
</body>

WebKit has a quirk for nested lists that prevents the bullets from being on the same line.  It's ancient code, so I'm not sure how sane it is.  Anyway, use strict mode.

>> The only differences between the two are that the outside marker doesn't affect the placement of objects on the line, and the outside marker gets a paint translation applied to shove it outside.
> 
> The outside bit there seems like an implementation detail... In Gecko, the same effect is achieved through totally different means.

Yeah, I would like painting to remain an implementation detail for CSS2.1, but I think the spec dictating that the marker is not clipped by overflow and that it doesn't scroll with overflow is indirectly implying paint order and stacking rules.  The fact that no engines respect this text concerns me as well.

Mostly, though, I just want a clarification on text-align, since WebKit is the only engine to ignore text-align on outside bullets.  However, if we decide outside bullets *should* respect text-align, then the other stuff (especially the overflow clipping and scrolling) comes into question as well.

dave
(hyatt@apple.com)

Received on Tuesday, 23 November 2010 06:15:06 UTC