Re: [css3-lists] glyphs in single string

Håkon Wium Lie:

> As John pointed out, they are really characters so the 'glyphs'
> property should be renamed.

’marks’ works for me: a marker is composed of marks. It’s of course not only the property name, but also the overall nomenclature.

> Then there's my concern about 'type' being too generic

Call the descriptor ‘counter-type’, ‘increment’ or ‘sequence’ then.

> @counter-style lower-norwegian-glyphs {
>   alphabetic: a b c d e f g h i j k l m n o p q r s t u v w x y z æ ø å;
> }

I don’t like magic on the left side of the colon, it’s not very CSSy. 

I’d even like ‘glyphs’ and ‘additive-glyphs’ to merge, where token values would increment by 1, starting at 1, if nothing more specific is specified, i.e. “'0 A B'” = “1 '0', 2 'A', 3 'B'” = “1 '0 A B'”. This of course has some implications on whether or how a single string value would work. I suggest the ‘marks’ value grammar be:

  [ <number>? <string> ]+


  <number>? <string> [, <number>? <string> ]*

where the strings would be tokenized as space-separated character lists with the optional <number> being the numeric value of the first token, the following being increase by a step value of 1.

  @counter-style zeroab {
       marks:         '0 A B';
    sequence: …;/*
      non-repeating ⇒ 0 A B 4  5  6  7  8  9 …
      repeating     ⇒ 0 A B 0  A  B  0  A  B …
      alphabetic    ⇒ 0 A B 00 0A 0B A0 AA AB B0 BA BB …
      symbolic      ⇒ 0 A B 00          AA          BB …
      numeric       ⇒   A B          A0 AA AB B0 BA BB …
      additive      ⇒ 0 A B                   B0 BA BB …

I don’t understand why you would use tuples in the ‘marks’ descriptor for ‘additive’, but then put the start (“first glyph value”) in the ‘sequence’ descriptor for ‘non-repeating’, i.e.

  type: non-repeating 0; glyphs: '0 A B';

should become

  sequence: non-repeating; marks: 1 '0 A B';

I would also consider to remove the ‘override’ type and instead use a ‘base’ descriptor, defaulting to ‘decimal’. Actually, I see no reason why you shouldn’t be able to override any descriptor of that base, including the marks used. Stepping back even more, the sequence types could be generic counter styles, that means this would work:

  li {list-style-type: alphabetic;}

or you would use either of these:

  @counter-style alphabetic {base: lower-alpha;}
  @counter-style lower-alpha {base: alphabetic;}

and there was no ‘type’ or ‘sequence’ descriptor.

Received on Friday, 25 November 2011 11:24:58 UTC