- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 20 Mar 2015 13:35:35 -0700
- To: Andrea Rendine <master.skywalker.88@gmail.com>
- Cc: WHATWG List <whatwg@whatwg.org>, Martin Janecke <whatwg.org@prlbr.com>
On Fri, Mar 20, 2015 at 1:30 PM, Andrea Rendine <master.skywalker.88@gmail.com> wrote: > SVG can be resized. Everything inside it cannot, as far as it is not defined > by relative units. If you use percentage coordinates, or use px coordinates plus a viewBox attribute on the <svg>, the stuff inside resizes along with the <svg> container just fine. > And percentage is not limited to ingegers, of course, but > it requires a value conversion. That math is done to sub-pixel accuracy. It's not anything you need to worry about. > And I'm not sure it works with polygons. Polygons implicitly use the px unit (the "no unit" unit), so you just need to put a viewBox on the SVG to make them resize with the <svg> root. ~TJ
Received on Friday, 20 March 2015 20:36:19 UTC