- From: Bert Bos <bert@w3.org>
- Date: Tue, 29 Jan 2002 19:03:17 +0100
- To: "'www-style@w3.org'" <www-style@w3.org>
Mats Tedenvall writes: > Hi, > I heard that future versions of CSS might support vendor-specific extensions > by allowing identifiers to begin with '-'. That would allow vendor-specific > properties such as -wap-input-format (WAP Forum extension) or > -xyz-inner-border-color (xyz company extension). > I wonder how that could be syntactical possible, since it would then be > impossible for a tokenizer to separate negative numbers from identifiers. > For example, is '-123' a negative number or is it an identifier? Yes, this has been an unwritten convention for a while. In April last year, we were on the point of publishing a draft describing it, but then we reorganized things a bit and decided that this convention was not a CSS module on its own, but really just a section in the Syntax module. The Syntax module is slowly getting ripe for publication, but is taking longer than expected :-( An identifier indeed cannot start with a dash. That is fine, because it guarantees that the official CSS will never contain such identifiers. If some implementation has an extension, it just has to extend the parser a bit as well. In essence, it will have to accept the pair of tokens "-" + identifier as a "proprietary identifier." (But note that '-123' is not a valid example, because '123' starts with a digit and is therefore a number, not an identifier.) However, some implementers complained that re-combining the minus and the identifier made things too hard for them, because they couldn't use an off-the-shelf CSS parser. Thus the latest plan is to also allow proprietary identifiers that start with an underscore ('_vnd_foo'). The CSS WG thereby promises to not use underscores at the start for any official property. (That is not very hard, because CSS has always carefully avoided underscores anywhere, because of their geeky look, that might scare users.) Of course, publishing the convention doesn't mean that we think proprietary extensions are OK in general, just that there may be cases (UA style sheets, experiments, etc.) where they are needed. This convention can make their use a little bit easier without harm to CSS. Bert -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos/ W3C/INRIA bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Tuesday, 29 January 2002 13:03:18 UTC