viewport units in SVG

Hi,

CSS and SVG have both the notation of a “viewport”. However, both mean different things.

1) For CSS it is basically the area of a webpage that is visible in a window.
2) For SVG (simplified) it is the dimension of the canvas. Certain elements can create a new viewport in which case the size of the element is the size and origin of the viewport.

CSS introduced viewport units vh, vw, vmin and vmax. Of course they represent the visible area in the window: 1vw is basically the horizontal area of the window.

What do we do with viewport units in SVG? I would assume that they mean the same for SVG roots as for CSS in HTML. Independent of the canvas size the viewport units represent the width and height of the window. With overflow: scroll, it should already be useful. But what about SVG viewport generating elements and the content in them? The window size might not matter inside. Authors could also find the canvas size useful as a reference point. For the latter we would still have percentage though. 

Any thoughts?

Greetings,
Dirk

Received on Tuesday, 22 July 2014 19:30:26 UTC