- From: Kornel Lesiński <kornel@geekhood.net>
- Date: Fri, 14 Mar 2014 21:42:45 +0000
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style@w3.org
- Message-Id: <40FD7250-EB40-494C-B275-B6E17E3C1EC0@geekhood.net>
On 13.03.2014, at 18:12, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> That's why I'd prefer "underscore anywhere in the name" over "leading
>>> underscore" - you can put the namespace before the underscore, leading
>>> to a nice visual separation.
>>
>> Since we have -[vendor]- for custom vendor things, we could just reserve --
>> for 'no vendor, just custom'... At least it's explainable/consistent.
>
> It has a nice ring to it, but I don't think it's substantially better
> than _. I can go either way.
>
> We'd have to use it for the other custom things, too (which is totally
> possible).
Removing the var- prefix is a great idea, since custom properties get confused with SASS/LESS variables. I'd even go as far as renaming var() to prop().
Rule allowing "_" anywhere in the name seems like a better solution than the "--" prefix, since it allows shorter names and encourages namespacing: "prefix_" is IMHO much more tolerable than "--prefix-", and avoids being confusingly similar to vendors' "-prefix-".
I wonder whether custom properties looking almost like 1st-class properties will encourage authors to use them beyond CSS var() and polyfills, and instead invent their own JS-based layout engines, e.g.
.gallery {
masonry_display: jagged_grid;
}
I'm not sure whether that's awesome or terrible :)
--
regards, Kornel
Received on Friday, 14 March 2014 21:43:22 UTC