Re: transform as a presentation attribute [was: Re: [whatwg] SVG cloning elements from HTML5]

On Tue, Jun 24, 2014 at 2:27 PM, Juergen Roethig
<roethig@dhbw-karlsruhe.de> wrote:
> Tab Atkins Jr. wrote:
>> So, all "transform" does is transform the coordinate space that those
>> units work in.  This is identical between CSS and SVG; some SVG
>> presentation attributes just allow px lengths to be specified without
>> a unit, while the CSS properties require units.  So yes, your
>> coordinate system unit might be 5px wide *in the untransformed
>> viewport's coordinate space*, but in the local space it's still just
>> 1px, because user coordinates *are* px units when untransformed.
>> Viewbox is a scale/translate transform applied after the other
>> transforms.
>
> The statement "user coordinates *are* px units when untransformed" is _not_
> true, at least not for SVG in the actual specification.
> See [http://www.w3.org/TR/SVG/coords.html]:
>>
>> Lengths in SVG can be specified as:
>>
>> (if no unit identifier is provided) values in user space — for example,
>> "15"
>> (if a unit identifier is provided) a length expressed as an absolute or
>> relative unit measure — for example, "15mm" or "5em"
>> The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in,
>> and percentages.
>
>
> This is a clear distinction between values in user space and a length
> expressed with the help of a unit.

In practice, user-space units and px units are interchangeable.  If
the spec is unclear, it can be fixed, but what I'm saying is
definitely true.  Here is a test-case:

<!DOCTYPE html>
<svg viewBox="0 0 10 10" width=100 height=100 style="border: thin solid;">
 <rect x=1 y=1 width=2   height=2   fill=blue ></rect>
 <rect x=1 y=5 width=2px height=2px fill=green></rect>
</svg>

Using other units, such as 'em' or 'cm', also makes this clear -
they're scaled accordingly to maintain the correct relationship with
the px unit.

>>> On Tue, Jun 24, 2014 at 12:48 PM, Juergen Roethig
>>> <roethig@dhbw-karlsruhe.de> wrote:
>>> ... but I am surprised to learn, just now, about the accuracy,
>>> carefulness,
>>> and reliability when making new "standards" in the W3C - so far the
>>> "living
>>> standard" of HTML was the best example for that (and yes, I know, the
>>> term
>>> "living standard" for HTML is not originating from the W3C), but other
>>> standards seem to adopt those superiour principles as well (irony
>>> intended,
>>> or in that case you might even call it sarcasm).
>>
>> Cool story bro.
>
> Not as cool as the "Junior" on this list!

This is getting quite inappropriate.  Please stop.

~TJ

Received on Tuesday, 24 June 2014 21:44:51 UTC