[css3-lists] Feature requests

I've split this out from the thread it originally appeared in, as it
seems irrelevant to the topic of that thread.

On Mon, Apr 25, 2011 at 10:34 AM, Alan Gresley <alan@css-class.com> wrote:
> As an author, I would like the possibility to declare how many digits a list
> can have. An example of a <OL> with four digits.
>
>
> 0001 <li> ... </li>
> 0002 <li> ... </li>
>
>      up to
>
> 9999 <li> ... </li>

This is doable with an alphabetic style if you're willing to play
around with the list value.  If you take the 'decimal' style and
switch it to alphabetic, you get "0001" at value 1111, and the next
10k values all have 4 digits in the appropriate order.


> An example of a <OL> with the spacing of four digits.
>
>   1 <li> ... </li>
>   2 <li> ... </li>
>
>        to
>
>  10 <li> ... </li>
>
>      up to
>
> 9999 <li> ... </li>

Use an explicit width on the ::marker.


> Also the often requested subitems within one <ol>. Like decimal places.
>
>
> 1.1 <li> ... </li>
> 1.2 <li> ... </li>
> 2   <li> ... </li>
> 3.1 <li> ... </li>

I'm not sure why you want to do this within a single <ol>.  It's not
possible without a lot of futzing around with <li value>.

With nested <ol>s, just set 'content' on ::marker with the counters()
function.  You can make nested <ol>s *look* like they're a single list
(rather than indenting the nested ones) with some fairly simple CSS
adjusting padding/margins.

~TJ

Received on Monday, 25 April 2011 17:52:25 UTC