Re: [svgwg] Attributes and properties that allow <length> value should also allow <number> and <percentage>

We had decided to match the CSS definition of `<length>` with the one 
exception that in a presentation attribute, only, a unitless number is
 always allowed as an alternative to a length or an angle.  That is 
defined in the [value syntax 
section](https://svgwg.org/svg2-draft/types.html#syntax) (after 
Annotation 1, starts "When a presentation attributeā€¦").

For properties from SVG 1.1 that allowed unitless numbers even in CSS 
syntax (like `stroke-width`), the syntax has been changed to expressly
 allow a number instead of a length.  I'm pretty sure @nikosandronikos
 did a clean-up of most of the presentation attributes to match the 
stricter syntax.

For the geometry properties, which were only simple attributes in SVG 
1.1, it is intentional that the CSS syntax does not include unitless 
numbers.  Unitless number will still be valid in the attribute, but 
the CSS form requires explicit length units (or percentage).  This is 
consistent with how properties like font-size and letter-spacing have 
always behaved.

Given all that, it looks like **the geometric attributes for paint 
servers still need to be corrected to accept percentages**.  Are there
 any other places that require editing?

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at 
https://github.com/w3c/svgwg/issues/222#issuecomment-238061816 using 
your GitHub account

Received on Sunday, 7 August 2016 03:56:32 UTC