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

Re: Mandate longhand naming conventions

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 04 May 2012 13:24:28 -0700
Message-ID: <4FA43AFC.4020205@inkedblade.net>
To: www-style@w3.org
On 04/06/2012 01:28 AM, Lea Verou wrote:
> Up until recently, a defacto naming convention was followed for longhands: Every longhand property name had to start with the
> shorthand property name plus a hyphen. For example, all the properties the background shorthand consists of, start with
> "background-" and every property that starts with "background-" belongs to the "background" shorthand.
>
> This convention had quite a few benefits, including:
> ...
> I understand that it's too late to change most of these. What I'm suggesting is to:
> 1. Make the convention mandatory from now on, so that the number of violations does not increase. It's easier to deal with a
> rule that has few exceptions than to not have a rule at all.
> 2. Document the exceptions in an official list that script authors and trainers can use.

I don't think we should make this mandatory, since there are sometimes
reasons to use the same prefix on a property even when it is not settable
by the shorthand of that prefix, and because in some cases we will be
expanding out old properties that don't provide a good prefix for what
they're combining (e.g. 'white-space').

However, we should have this stand as a recommendation, since it is a
good convention. You should have a *reason* to deviate from the convention.

Wrt documentation, how/where would you like these things documented?

~fantasai
Received on Friday, 4 May 2012 23:50:49 GMT

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