W3C home > Mailing lists > Public > www-style@w3.org > September 2015

Re: [css-font-loading] 'family' should be 'fontFamily', to prevent API fragmentation

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 4 Sep 2015 11:11:42 -0700
Message-ID: <CAAWBYDBPEiDxZxO3Rr+0K03a0uW239Z41U+=JtfT8J1VjgiO6g@mail.gmail.com>
To: Mike Kamermans <nihongo@gmail.com>
Cc: www-style list <www-style@w3.org>
On Fri, Sep 4, 2015 at 8:41 AM, Mike Kamermans <nihongo@gmail.com> wrote:
> The base JavaScript API for working with CSS in general, where hyphenated
> CSS property names are mirrored as camelCase property names. In the case of
> setting font family, front end devs know this requires
> "element.style.fontFamily = 'Arial, Helvetica, ...';".
> So, given that @font-face also uses the "font-family" CSS property, keeping
> this property mirrorred as "fontFamily" on the JS side, to prevent confusion
> for the people who actually have to write front end code on an hourly basis,
> makes a whole lot of sense.

@font-face *doesn't* mirror it as fontFamily.

...or at least, it should.  Hmm, it looks like Chrome and FF, at
least, are ignoring the spec and still implement the DOM Level 2 Style
version.  I'll bring this up in a separate thread.

Received on Friday, 4 September 2015 18:12:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:56 UTC