W3C home > Mailing lists > Public > www-svg@w3.org > July 2014

viewport units in SVG

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 22 Jul 2014 19:29:54 +0000
To: www-svg <www-svg@w3.org>, FX <public-fx@w3.org>
Message-ID: <DD6DCE66-BACD-48E0-999B-5E27C5D4850F@adobe.com>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:37 UTC