[csswg-drafts] [css-transforms] `transform-box:stroke-box` with `vector-effect:non-scaling-stroke` creates a cyclical dependency (#9640)

jwatt has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-transforms] `transform-box:stroke-box` with `vector-effect:non-scaling-stroke` creates a cyclical dependency ==
A cyclical dependency can be created if [`transform-box:stroke`](https://www.w3.org/TR/css-transforms-1/#transform-box) and [`vector-effect:non-scaling-stroke`](https://svgwg.org/svg2-draft/coords.html#VectorEffects) are both used on the same stroked SVG element. (And by implication, `transform-box:border-box` too, since the spec says "For SVG elements ... the used value for `border-box` is `stroke-box`.")

To calculate the stroke bounds of an element with `vector-effect:non-scaling-stroke` we need to resolve the transform to the element's outer-`<svg>`, but to resolve that transform when the element has `transform-box:stroke-box` requires the element's stroke bounds if the transform contains percentage values.

I don't think there's an ideal way to break this cyclical dependency, but I would suggest breaking it by requiring implementations to use `fill-box` in place of `stroke-box` (or `border-box`) if the element has `vector-effect:non-scaling-stroke`. (Probably regardless of whether it has a transform that contains percentage values, just to make implementation reasonable.)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9640 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 27 November 2023 10:07:00 UTC