Re: The (new, enhanced) viewbox property

On Tue, Dec 17, 2013 at 2:57 PM, Brian Birtles <bbirtles@mozilla.com> wrote:
> (2013/12/17 23:43), Dr. Olaf Hoffmann wrote:
>> The name of the attribute is already 'viewBox'.
>> To avoid confusion for authors, the property should have the same
>> name as the attribute.
>
> To the best of my knowledge, CSS properties don't use camelCase but separate
> words with '-' and I'm pretty sure that rule is set in stone.
>
> So I think it's a choice between 'view-box' and 'viewbox' and since it is
> possible to use 'viewbox' as the attribute name in some contexts I think it
> is preferable.

Correct that CSS separates words with dashes, because CSS is ASCII
case-insensitive for language-defined things.  We traditionally write
it all lowercase, but you can do whatever casing you want.

I don't think English has a preference between "viewbox" and "view
box".  It would likely be just fine for CSS to have a property named
"viewbox" (which SVG-comfortable authors could write as "viewBox" if
they chose).

~TJ

Received on Tuesday, 17 December 2013 23:37:20 UTC