W3C home > Mailing lists > Public > www-svg@w3.org > March 2009

'image-fit' vs preserveAspectRatio

From: Simon Pieters <simonp@opera.com>
Date: Fri, 13 Mar 2009 14:54:11 +0100
To: "www-style@w3.org" <www-style@w3.org>, "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <op.uqqgwlqxidj3kv@zcorpandell.linkoping.osa>
We're speculating about implementing 'image-fit'

http://dev.w3.org/csswg/css3-page/#propdef-image-fit

and we note that it's pretty similar to preserveAspectRatio in SVG

http://www.w3.org/TR/SVG11/coords.html#PreserveAspectRatioAttribute

The SVG attribute is not available as a CSS property.


We're considering the feasibility of aligning the two and making the SVG attribute map to the CSS property.

The CSS property allows the same precision as 'background-position' for positioning, while SVG has less precision. What are the use cases for more precision? Could the SVG WG consider allowing the same precision for preserveAspectRatio?

The CSS spec allows the image to go outside of the layout box with 'overflow:visible; image-fit:cover'. What's the use case for this?

Previously, the CSS spec had the same keywords as SVG. What's the reason for the change?


Cheers,
-- 
Simon Pieters
Opera Software
Received on Friday, 13 March 2009 13:55:00 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:41 GMT