- From: Fredrik Söderqvist via GitHub <noreply@w3.org>
- Date: Mon, 22 Sep 2025 08:27:01 +0000
- To: public-svg-issues@w3.org
The spec says[1]: > If [primitiveUnits](https://drafts.fxtf.org/filter-effects/#element-attrdef-filter-primitiveunits) is equal to [userSpaceOnUse](https://drafts.fxtf.org/filter-effects/#attr-valuedef-primitiveunits-userspaceonuse), any length values within the filter definitions represent values in the current [local coordinate system](https://drafts.csswg.org/css-transforms-1/#local-coordinate-system) in place at the time when the [filter](https://www.w3.org/TR/filter-effects-1/#elementdef-filter) element is referenced (i.e., the user coordinate system for the element referencing the filter element via a [filter](https://drafts.fxtf.org/filter-effects/#propdef-filter) property). and "local coordinate system" is defined as[2]: > The current local coordinate system (also user coordinate system) is the coordinate system that is currently active and which is used to define how coordinates and lengths are located and computed, respectively, on the current canvas. The current user coordinate system has its origin at the top-left of a [reference box](https://drafts.csswg.org/css-transforms-1/#reference-box) specified by the [transform-box](https://drafts.csswg.org/css-transforms-1/#propdef-transform-box) property. So in the testcase the HTML case(s) would resolve the percentage against the border box, while the SVG case(s) would resolve them against the viewport. I think it used to be that all browser engines resolved against the viewport of the `<filter>` element's ancestor `<svg>` in the SVG case. The HTML case seems more mixed - I think in Blink (for `primitiveUnits`) they basically end up being ignored (might also bleed in to the SVG case by the looks of it). [1] https://drafts.fxtf.org/filter-effects/#element-attrdef-filter-primitiveunits [2] https://drafts.csswg.org/css-transforms-1/#local-coordinate-system -- GitHub Notification of comment by fsoder Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1012#issuecomment-3317544179 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 22 September 2025 08:27:02 UTC