- From: Philip Rogers via GitHub <sysbot+gh@w3.org>
- Date: Mon, 24 Jun 2024 21:52:11 +0000
- To: public-css-archive@w3.org
progers has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-zoom] CSS Zoom and SVG == Should CSS zoom be supported in SVG? Below are some examples: ``` <svg width="100" height="100" style="background: #006AA7;"> <!-- zoom affecting css properties --> <rect style="x: 5px; y: 5px; width: 40px; height: 5px; fill: #fecc0284; zoom: 2;" /> <!-- zoom affecting geometry properties --> <rect x="5" y="15" width="40" height="5" fill="#fecc0284" style="zoom: 2;" /> <!-- nested zoom and geometry properties --> <g style="zoom: 2"> <rect x="5" y="25" width="40" height="5" fill="#fecc0284" /> </g> <!-- zoom affecting geometry attributes --> <line x1="5" y1="37.5" x2="45" y2="37.5" stroke-width="5" stroke="#fecc0284" style="zoom: 2;"/> </svg> ``` For historical reasons, Blink and Webkit currently implement zoom as an additional transform at the SVG root, and ignore zoom inside SVG. CSS spec questions: - Should used `<length>` properties (e.g., `x` and other [geometry properties](https://svgwg.org/svg2-draft/single-page.html#chapter-geometry)) be affected by zoom? Yes, based on the existing text for [used values](https://drafts.csswg.org/css-cascade-3/#used) and the [zoom property](https://drafts.csswg.org/css-viewport/#zoom-property)? SVG spec questions: - Should `<length>` attributes (e.g., [`x1`](https://svgwg.org/svg2-draft/single-page.html#shapes-LineElementX1Attribute)) be affected by zoom? Yes, for consistency with styles (requires spec update)? - Should [getBBox](https://svgwg.org/svg2-draft/single-page.html#types-__svg__SVGGraphicsElement__getBBox) be affected by zoom? No, as the spec intends it to be a local value which is not affected by transform (requires spec update)? - Should [getCTM](https://svgwg.org/svg2-draft/single-page.html#types-__svg__SVGGraphicsElement__getCTM) be affected by zoom? Yes, as it should be used with getBBox to get a rect in the root coordinate space (requires spec update)? cc: https://github.com/w3c/csswg-drafts/issues/5623 @chrishtr @emilio @szager-chromium Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10490 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 24 June 2024 21:52:13 UTC