Re: [css3-lists] glyphs in single string

Also sprach Tab Atkins Jr.:

 > >>> @counter-style lower-norwegian {
 > >>>   type: alphabetic;
 > >>>   glyphs: 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 æ ø å;
 > >>> }
 > >>
 > >> Then you can't distinguish an<image>  from a glyph that just happens
 > >> to look remarkably like url(foo).
 > >
 > > If you're using unquoted values, you definitely should be restricting
 > > them to identifiers only (or, at most, IDENT, NUMBER, and DIMEN).
 > >
 > > And, as Peter Moulder says, allow quoted strings for hard-to-escape cases.
 > 
 > This seems completely reasonable.  I'm totally fine with allowing
 > IDENT, NUMBER, DIMEN, <string>s, and <image>s.  This has none of the
 > weaknesses of the other proposals, while being maximally compact.
 > 
 > Hakon, does this sound good to you too?

What are the hard-to-escape cases? I can only see that 'url()' causes
problems, no? If we separate out images, I'm not sure we need
<strings>.

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

Then there's my concern about 'type' being too generic (Many other
places in CSS would also like to describe types. Should they be
allowed to use it too? If not, why should it be allowed here?)

We can address all these concerns with a syntax like this:

 @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 æ ø å;
 }

 @counter-style lower-norwegian-images {
   images: url(a.svg) url(b.svg) url(c.svg); /* etc */
 }

 @counter-style cjk-decimal {
   numeric: \3007 \4E00 \4E8C \4E09 \56DB \4E94 \516D \4E03 \516B \4E5D;
 }

 @counter-style diamond {
   repeating: ◆;
 }

 @counter-style diamond {
   non-repeating: ⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳;
   start-from: 0;
 }

(We'd need some rules to determine the winner if more than one is set:

 @counter-style foo {
   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 æ ø å;
   images: url(a.svg) url(b.svg) url(c.svg);
   numeric: \3007 \4E00 \4E8C \4E09 \56DB \4E94 \516D \4E03 \516B \4E5D;
 }

but that's simple enough, we just establish relative strength between
the various types.)

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Friday, 25 November 2011 09:25:22 UTC