W3C home > Mailing lists > Public > www-style@w3.org > November 2011

Re: [css3-lists] glyphs in single string

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 23 Nov 2011 10:36:05 -0800
Message-ID: <CAAWBYDDzSNoz96OmuSiD=RoTXmw2MC1dxR9YxdoeBb+0+iwpxQ@mail.gmail.com>
To: Håkon Wium Lie <howcome@opera.com>
Cc: Peter Moulder <peter.moulder@monash.edu>, www-style@w3.org
On Wed, Nov 23, 2011 at 9:48 AM, Håkon Wium Lie <howcome@opera.com> wrote:
> Also sprach Tab Atkins Jr.:
>  > > Do we really need the longhand? Why not just have a space-separated
>  > > list?
>  >
>  > We need the longhand because images are allowed as glyphs.
> Right. How common will it be to combine images and glyphs in the same
> list style? One indication that it may not be too common is that there
> are no examples of this use in the spec.

Not very common, I would think.  The spec used to contain an example
of mixing an image and text in the *same* marker (I ended up editting
it out), but that's actually impossible in the current syntax (the
example used the 'content' property to do it).

> It seems that all the examples in the spec that use strings can be
> rewritten in the shorthand syntax.
> So, I suggest adding the space-separated shorthand syntax and rewrite
> examples to use it.

I'm still concerned about this for two reasons.  The first is just
theoretical - CSS currently has no other example of a string
containing complex data like this.  We always use lists of tokens, and
let strings exist as a single opaque unit.  The only reason we're
trying to use a string here is that the normal tokenization rules
don't like the sorts of things we might provide.  The second is
practical - the space-separated syntax prevents an author from ever
having a marker with a space in it.  Daniel provided an example of
this in the "Mongolian and French lists" thread.

What if we used a function as the quotes instead?

@counter-style lower-norwegian {
  type: alphabetic;
  glyphs: 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 æ ø å);

We'd tokenize the contents of the glyphs() function by spaces, and
only require that the various brace characters ()[]{} be escaped
within it.

Received on Wednesday, 23 November 2011 18:36:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:52 UTC