W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css-syntax] <an+b> grammar: escaping

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 28 May 2013 08:37:37 -0700
Message-ID: <CAAWBYDAJaBjym4no985e==fov=EjijpYeXz0UPa432asMfESKg@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: "L. David Baron" <dbaron@dbaron.org>, Zack Weinberg <zackw@panix.com>, www-style list <www-style@w3.org>
On Mon, May 27, 2013 at 7:55 PM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Another "interesting" corner case:
> In some cases, a minus sign is part of an <ident> token. But once
> tokenization is done, we don’t know anymore if that character was escaped in
> the CSS source. This is a similar issue to that of the syntax of ID
> selectors.
> So, what exactly do we want to allow to be escaped or not? Selectors 3 uses
> {N} and ['-'|'+'], which means that n can be escaped but not a plus or minus
> sign.

I don't think it matters in any way, shape, or form which way we go
here, so I'm happy to just let the answer fall out of the grammar I've
defined.  That means that, depending on where the + or - appears, it
might be escapable or not.  This is not a detail that matters to

The presence/absence of escaping rules in the Selectors grammar isn't
a great indicator, because it's very annoying to specify escapability.
 Once you're already specifying caselessness you can just cargo-cult
the escapability in, but I'd never purposely add new non-letter tokens
if I was writing a token grammar like that.

Received on Tuesday, 28 May 2013 15:38:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:30 UTC