W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] [html5] r5307 - [giow] (0) use vendor--feature instead of _vendor-feature since Apple engineers [...]

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 31 Aug 2010 15:48:47 -0400
Message-ID: <AANLkTikGHYEGBfcanv1ZHHAFmQ7Pffs8Fda_b77bOOfo@mail.gmail.com>
On Tue, Aug 31, 2010 at 3:48 AM, Simon Pieters <simonp at opera.com> wrote:
> If a vendor is called "data", then data--feature becomes a data-* attribute
> and is included in .dataset.

I missed the fact that "data--foo" is actually a valid data attribute.
 I guess I assumed that the name part couldn't start with a hyphen.
"data--foo" would be accessed via JS as .dataset.Foo rather than
.dataset.foo because of a degenerate application of the camel-casing
rules, but it's allowed.

Anyway, I preferred the initial-underscore convention -- it's easier
to spot, and would be more understandable to people who know CSS.
Received on Tuesday, 31 August 2010 12:48:47 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:26 UTC