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

On Thu, Sep 9, 2010 at 1:08 PM, Belov, Charles <Charles.Belov@sfmta.com> wrote:
> fantasai wrote on Wednesday, September 08, 2010 4:52 PM
>> On 09/08/2010 02:18 PM, Tab Atkins Jr. wrote:
>> >
>> > 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'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.
>
> ASCII spaces would need to be escaped as well.

Strings are definitely *allowed* as glyph 'characters', so you don't
need to escape spaces.  I'm just hoping I can avoid *requiring* them
in the common case.

But that may not be worthwhile.  This isn't something that'll be typed
often anyway - if an author defines a new list-style, it will be once
per stylesheet at the most.  More likely, it'll be once per project or
once per site, or less if they make a modular sheet containing the
list-styles they like to use.  Putting in an extra few dozen quote
marks is somewhat annoying, but not a big deal in this case.

~TJ

Received on Thursday, 9 September 2010 20:26:04 UTC