Re: svgView transform behaviour (was: Re: [svg2] transform on <svg>)

On Fri, 27 Feb 2015 17:54:34 +0100, Amelia Bellamy-Royds  
<amelia.bellamy.royds@gmail.com> wrote:

> (comments inline)
>
> On 27 February 2015 at 05:15, Erik Dahlström <ed@opera.com> wrote:
>>
>> Should #svgView(transform(none)) mean that the transform set on the root
>> <svg> element is ignored?
>>
>
> Not as we resolved it yesterday -- if transform is in *addition* to the
> root transform, then this would be a no-op.

That is exactly why I raised this point, I don't think this particular  
case was considered in that discussion.

The way I interpret the keyword 'none' is that the target has no  
transform, which is a form of reset/override.

> If we treated transformations like other svgView parameters -- so they
> *replace* the value on the root element -- then it would be an override.

I think 'none' is a special case, see [1].

>> If one wants to use more than one transform, say to scale and translate,
>> should that be possible to do using svgView? The order of application
>> would then need to be defined.
>>
>
> You would do it just the same as you would for a transform attribute, as  
> a
> list of transformation functions.  Just with more parentheses:
>
> #svgView(transform(scale(2)rotate(45)translate(10,20)))
>
> What happens if you add 'transform(none)' in the middle or the svgView
>> syntax, e.g svgView(transform(scale(2)),transform(none),transform(
>> scale(2)))?
>
>
> It would be invalid.  The version you have above is invalid because it  
> has
> three different transform attributes, and you're not allowed to repeat
> attributes in an svgView fragment(also, multiple attributes are separated
> by semicolons, not commas).

I think you're correct, what I wrote would indeed be invalid.

The first question is: should 'none' be allowed in the svgView syntax at  
all? It's vague in the spec atm.

If it is allowed, then it follows from the syntax of the transform  
property[1] that only a single 'none' value is valid.



[1] http://www.w3.org/TR/css3-transforms/#transform-property

-- 
Erik Dahlstrom, Web Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group

Received on Monday, 2 March 2015 14:31:19 UTC