[csswg-drafts] [css-transforms-1] 'viewbox' definition doesn't make sense (#4662)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-transforms-1] 'viewbox' definition doesn't make sense ==
In <https://drafts.csswg.org/css-transforms-1/#valdef-transform-box-view-box>, the 'viewbox' value refers to the nearest SVG viewport. It then goes into greater detail, saying:

> If a viewBox attribute is specified for the SVG viewport creating element:
> 
> * The reference box is positioned at the origin of the coordinate system established by the viewBox attribute.
> 
> * The dimension of the reference box is set to the width and height values of the viewBox attribute.

As a concrete example, say you want a 100x100 coordinate system, with a "padding" of 20 on all edges. You'd write that as `viewbox="-20 -20 140 140"`, giving you coordinates between [-20, 120] to use.

Following this spec text then, the box implied by viewbox is at the 0,0 coordinate of the viewport (20 units in from the top and left), but it's 140 units wide and tall, extending out past the visible viewbox area.

I suspect this really just means "yeah, it's the whole viewport, from top-left corner to bottom-right corner", in which case we can delete the entire attempt at greater detail.

If it really does mean to start it at the 0,0 coordinate (which is *outside the viewport* if the x/y values are positive!), then I have no idea what width/height it really wants, but the currently-specified values are nonsensical.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4662 using your GitHub account

Received on Friday, 10 January 2020 00:13:34 UTC