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

Re: [css3-syntax] Escaping U, R or L in url() tokens

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 03 Jan 2013 18:07:19 +0100
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style@w3.org
Message-ID: <0rbbe8dh9ve0ca36utrco8voaqq3dckg8p@hive.bjoern.hoehrmann.de>
* Simon Sapin wrote:
>In both CSS 2.1 and the css3-syntax ED, url( is ASCII case-insensitive 
>but can not be escaped. This looks deliberate to be, but I’m told that 
>it could be an oversight. It’s a bit inconsistent with at-rules.

Allowing escapes while keeping the `url(...)` notation a single token
would complicate the tokenizer without adding anything that people do
care about using. The selection of tokens is probably more of an acci-
dent, there are tokens for constructs CSS syntax is actually using,
like there is a token for `|=` in CSS 2.1, but there is none for `^=`,
which is a new construct in CSS3.

If CSS syntax could be designed from scratch, it's quite possible the
`url(...)` notation would be just like any other functional notation,
and no token on its own. That would avoid some of the issues mentioned
in <http://lists.w3.org/Archives/Public/www-style/2010Jul/0499.html>,
but I suspect it's too late for that now (see the linked examples).

Allowing escapes in 'url' should not be a problem though, but I think
the CSS Working Group should first decide whether it actually wants the
tokenizer to be frozen, in which case this should be kept as-is, or if
it wants to modify it to accomodate new constructs like `^=` above, in
which case it could go either way.

(I do note, once more, that we are not blessed with independently use-
able CSS parsers that are fully conforming, and as a result we lack 
tools like validators and pretty printers that you can use even when
the style sheets you want to process contain unusual syntax; and when
the core syntax is changed every couple of months, that situation isn't
likely to improve.)
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 3 January 2013 17:07:48 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT