Re: SVG <length> to <length> | <percentage>

On Aug 19, 2012, at 4:43 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> Dirk Schulze:
>> The "Chapter 4: Basic Data Types and Interfaces" [1] needs some clean
>> up. It still references CSS2 instead of newer CSS specs. Since we
>> already have an issue there, it does not influence the FPWD.
>> 
>> We redefine a lot of data types which we shouldn't and don't seem to
>> be necessary.
> 
> Agreed; I've been meaning to cut a lot of that section out.
> 
>> <length> We support '%' for presentation attributes, but not for CSS
>> properties. Instead we should replace any appearance of <length>
>> with: <length> | <percentage>. Browsers support it anyway IIRC.
> 
> Browsers support percentages in style sheets for SVG properties defined 
> to just take a <length>?  If that's so, then I agree, we should mention 
> <percentage> explicitly.
Pure SVG CSS properties are 'stroke-width', 'stroke-dashoffset', 'baseline-shift' (now in CSS as well) and 'stoke-dasharray'. All of these properties support percentage in browsers. 'kerning'  just supports <length> in webkit. This is probably a bug, since that means percentage is not supported for the attribute as well, because of how we implement SVG presentation attributes.

> 
>> <color> and <angle> Don't need special casing anyway.
> 
> What about units for <angle>?
CSS supports all of SVG and more. The default is 'deg' for us in SVG.

> 
>> <anything> Is often used for identifiers. In these case we should
>> replace it with <ident> from CSS3 Values.
> 
> Yes.
> 
>> <coordinate> replace every appearance  with: <length> | <percentage>
> 
> I have often wondered about the difference between <length> and 
> <coordinate>.
It makes sense from a logical point of view, but is unneeded implementation wise.

> 
>> There are maybe a couple more types that I don't list here. I would
>> suggest removing the syntax from SVG, link to the responsible CSS
>> specification that defines it, and add a notation that for SVG
>> presentation attributes what missing unit means.
> 
> Agreed completely.

Dirk

Received on Monday, 20 August 2012 02:13:11 UTC