Re: [css3-lists] Specifying new list-types

On 09/08/2010 02:18 PM, Tab Atkins Jr. wrote:
> Heya all.  We discussed at the FtF that I'd be taking over editorship
> of the CSS3 Lists module.  I'll be doing some cleanup and
> clarifications to make everything good and accurate, but I wanted to
> discuss one particular relatively large change I was planning to make,
> which I mentioned offhand during the ftf.
>
> Right now, the module has a long list of various list-types.  From
> what I understand a lot of these were just added because Hixie *could*
> (binary?), rather than any specific use-case, but I believe that many
> of them truly are quite useful.
>
> Nearly all of these list-types use a small set of simple behaviors to
> define themselves.  This behavior can be extracted and given a little
> bit of syntax, and then used to define the list-types directly in UA
> style-sheets.
> ...
> A basic declaration would look like this:
>
> @list decimal {
>    type: numeric;
>    glyphs: 0 1 2 3 4 5 6 7 8 9;
>    suffix: ".";
> }
>

I think this is a good idea. I have a couple comments:

  - I suggest renaming @list to @counter-style, since counter
    styles are used elsewhere other than lists. But at least
    change it to @list-style.

  - I agree with Charles that glyphs should allow multi-character
    items. This is especially important for grapheme clusters
    composed of multiple characters.

  - I'm not sure your 'glyphs' will tokenize well. We can handle
    unquoted idents no problem, but digits are not idents. Also
    any ASCII punctuation would have to be escaped, which could
    be confusing as well. That said, quote marks around each
    character would be annoying. I think HÃ¥kon avoided this
    problem by quoting the whole thing.

  - I agree with Charles about having a 'prefix' parameter in
    addition to 'suffix'; that seems useful. Not so sure about
    the need for 'infix'.

> "string" - Just use the provided string as the marker for all values.
> (This allows you to specify arbitrary characters as bullets for
> unordered lists, which has been requested by authors.)

If you go with Charles' suggestion for a "repeating" type, then
"string" would no longer be necessary.

~fantasai

Received on Wednesday, 8 September 2010 23:52:19 UTC