- From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
- Date: Sat, 16 Jul 2016 01:18:53 +0000
- To: public-svg-issues@w3.org
AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "SVG 2": == Change definition of percentages to match implementations == The [Units section](https://svgwg.org/svg2-draft/coords.html#Units) says: > For any x-coordinate value or width value expressed as a percentage of the SVG viewport, the value to use is the specified percentage of the actual-width in user units for the nearest containing SVG viewport, where actual-width is the ***width dimension of the SVG viewport element*** within the user coordinate system for the SVG viewport element. [emphasis added] (and similar for y/height) No SVG implementation I know about uses the ***width dimension of the SVG viewport element*** as the basis for a horizontal percentage length. They use the viewBox width, regardless of whether or not the viewBox takes up the full width of the element. (Or even if it takes up more, in a `slice` aspect-ratio mode). ([Simple demo](http://jsbin.com/nubikepuka/1/edit?html,output), if you think better visually.) The text hasn't been changed since 1.1 (or since 1.0), so this isn't a recent careless edit, as I first thought when I read it. I don't know whether maybe I'm reading the prose wrong and maybe "actual width" was intended to mean "the viewBox width, after scaling to fill the element," and everyone involved understood it so the exact wording didn't matter at the time. The example that follows the prose isn't useful for distinguishing original intent, as it uses a viewBox that fills the full width and height. But regardless of whether implementations do or don't match the intended meaning of the original spec writers, all implementations are consistent and the spec should clearly define the standard behavior. Also, maybe change the example so that it clearly distinguishes between element dimensions and viewBox dimensions. See https://github.com/w3c/svgwg/issues/209
Received on Saturday, 16 July 2016 01:19:01 UTC