W3C home > Mailing lists > Public > www-svg@w3.org > December 2013

Re: The (new, enhanced) viewbox property

From: Brian Birtles <bbirtles@mozilla.com>
Date: Wed, 18 Dec 2013 07:57:30 +0900
Message-ID: <52B0D6DA.1040902@mozilla.com>
To: www-svg@w3.org
Hi Olaf,

Thank you for your feedback.

(2013/12/17 23:43), Dr. Olaf Hoffmann wrote:
> Brian Birtles:
>
>> a) Make it a CSS property so you can, for example, tweak it with media
>> queries to make responsive SVG images.
>
> If the SVG document is referenced, one can already change it with
> a) element view
> b) SVG fragment identifiers
> c) animation
>
> Are there additional use cases covered by a property?

Yes, please see my previous reply to Alex where I described such a case.

> If yes and this matters for content, it might be a good idea
> to provide a mechanism as well to have such a feature for
> content as well, not just for decoration.

I'm afraid I don't understand this comment.

>> Issue 1: The property name.
>> Proposal: 'viewbox'
>> Rationale: Otherwise we end up with 'viewBox', 'viewbox' (for
>> SVG-in-HTML) and 'view-box'. It feels like one word to me, or could be
>> anyway.
>
> 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.

Best regards,

Brian
Received on Tuesday, 17 December 2013 22:57:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:49 UTC