W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [css21][css3][svg] SVG and unit-less length values

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 02 Aug 2010 18:48:25 -0700
Message-ID: <4C577569.2070605@inkedblade.net>
To: Chris Lilley <chris@w3.org>
CC: Sylvain Galineau <sylvaing@microsoft.com>, Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org list" <www-style@w3.org>, "public-fx@w3.org" <public-fx@w3.org>
On 07/07/2010 08:18 AM, Chris Lilley wrote:
> On Wednesday, July 7, 2010, 5:02:00 PM, Sylvain wrote:
>>> From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU]
>>>> [3] http://www.w3.org/TR/SVG/types.html#DataTypeLength
>>> As the text at this link clearly says:
>>>     For properties defined in CSS2 [CSS2], a length unit identifier
>>>     must be provided. For length values in SVG-specific properties
>>>     and their corresponding presentation attributes, the length unit
>>>     identifier is optional.
>>> Now this leaves a loophole the size of a truck for properties not in
>>> CSS2 but presend in CSS2.1 or CSS3...  But that's pretty easy to fix.
> Agree about the loophole, not desirable (but hard to normatively link
> to all future CSS specs, too. Besides, CSS might in future define some
> properties with optional units).
> The easy fix being s/CSS2 [CSS2]/CSS/ ? or some other fix?

I suggest that SVG defines a <coord> value type, and uses <length> | <coord>
wherever needed. This way there is no confusion about <length>: it always
requires a unit.

Older SVG specs can simply be errata'd to clarify this loophole with an
explicit list of properties that can take <length> or <coord> where
<length> is specified.

Going forward, if SVG needs coordinate units in addition to CSS lengths
for SVG 2.0, we could define an actual unit identifier for them. Maybe
"cu" for "coordinate system units". Unit identifiers are an important
extension point in CSS syntax; we should take advantage of that.

Received on Tuesday, 3 August 2010 01:49:14 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:49 UTC