W3C home > Mailing lists > Public > www-style@w3.org > February 2003

Re: Proprietary identifier names

From: Bert Bos <bert@w3.org>
Date: Thu, 20 Feb 2003 19:12:27 +0100
Message-ID: <15957.6795.914180.739582@lanalana.inria.fr>
To: "www-style Mailing List" <www-style@w3.org>

Christian Roth writes:

> I see that Microsoft seems to use "mso-" for prefix, whereas Mozilla uses
> "-moz-".

Microsoft's prefix predates the WG's discussions on the topic.


> What route is the recommended way to go? We'd rather not need to change
> the prefix once the product is released.

The latest proposal (unfortunately still not published) is to use

   1. a hyphen or an underscore, followed by
   2. the (possibly abbreviated) name of your company,
   3. another hyphen or underscore, and
   4. the property name

E.g., "-moz-border-radius" if you are Mozilla or "-wap-accesskey" if
you are OMA :-)

Those extensions are meant for local use, they should ideally not be
passed over the public Web, but to reduce any risk of clashes, you
should probably still use a prefix whose length is inversely
proportional to how well-known your company is...

(And, of course, you should not use proprietary extensions at all.)

The initial hyphen is guaranteed never to clash with any official CSS
property, because indeed in the official grammar, an identifier cannot
start with a hyphen. We thought that somebody who needed a proprietary
property would not have much problem with also using a proprietary
tokenizer (the modification is tiny), but apparently it does pose a
problem for some implementations, so we added the underscore
convention. The underscore is a legal initial character, but part of
the proposal is that the CSS WG promises never to use it for any
official property.



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 Thursday, 20 February 2003 13:12:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:19 GMT