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

Re: [css3-lists] glyphs in single string

From: Peter Moulder <peter.moulder@monash.edu>
Date: Fri, 25 Nov 2011 15:34:56 +1100
To: www-style@w3.org
Message-id: <20111125043456.GA28858@bowman.infotech.monash.edu.au>
On Thu, Nov 24, 2011 at 07:17:36PM -0800, Tab Atkins Jr. wrote:
> On Wed, Nov 23, 2011 at 7:47 PM, fantasai <fantasai.lists@inkedblade.net> wrote:

> > 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.

fantasai wasn't explicit about her hesitance to include NUMBER and DIMENSION
tokens; below are a few issues with them.

If we allow NUMBER and DIMENSION, then I'd say that we'll have to update the
core grammar to specify that the exact string of characters is part of the
value of these tokens, so that 00 and 0 and 0a and 0A etc. are all distinct
values.

Would you also want to allow -09 as a counter value?  Note that the - isn't
part of the NUMBER token.

There are a few other messinesses too, such as allowing an unquoted counter
value 1.1 or 1.1a but not 1.a.

Another form of messiness is the inconsistency with the rules for font-family
and attribute selectors, which allow identifier tokens but not number/dimension
tokens.


The benefit of allowing NUMBER and DIMENSION tokens is that it saves a pair of
quotation characters when someone defines a new counter style where markers
still start with (or consist of) ASCII digits.  This doesn't sound like a very
common case to me, and it has an easy workaround of quoting the counter values.

Certainly it is a surprise that some things can omit the quotes while some
things can't, but there will always be some things that may surprisingly
require quotes (such as the -1 case), and a simple "string or identifier" rule
seems least surprising of the options.

pjrm.
Received on Friday, 25 November 2011 04:35:25 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT