[svgwg] gradient inherited via context-fill vs transforms (#1053)

matthiasclasen has just created a new issue for https://github.com/w3c/svgwg:

== gradient inherited via context-fill vs transforms ==
Should a gradient that is inherited via context-fill be affected by the transform of the shapes that it is inherited to ?

Chrome seems to think that the answer is no. Others disagree.
```
<svg id="svg1" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>`context-fill` with gradient in use (SVG 2)</title>

    <defs id="defs1">
        <linearGradient id="lg">
            <stop offset="0" stop-color="white"/>
            <stop offset="0.25" stop-color="black"/>
            <stop offset="0.5" stop-color="red"/>
            <stop offset="0.9" stop-color="green"/>
        </linearGradient>

        <g id="g1" transform='rotate(30,100,100)'>
            <rect id="rect1" x="50" y="50" width="100" height="100" fill="context-fill" stroke="context-stroke" />
            <path id="path1" transform-origin="100 100" transform="rotate(90)"
                  fill="context-fill" stroke="context-stroke"
                  d="M 100 15 l 50 160 l -130 -100 l 160 0 l -130 100 Z"/>
            <path id="path1" transform-origin="100 100" transform="scale(0.8 0.8)"
                  fill="context-fill" stroke="context-stroke"
                  d="M 100 15 l 50 160 l -130 -100 l 160 0 l -130 100 Z"/>
        </g>
    </defs>

    <use id="use1" xlink:href="#g1" fill="url(#lg)" stroke="url(#lg)"/>

    <!-- image frame -->
    <rect id="frame" x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>
```

![Image](https://github.com/user-attachments/assets/df517ad2-4ae6-4b57-9140-032e913448ff)

If I change some of the `fill="context-fill"` to `fill="url(#lg)", chrome does apply the local transform to it, so this
looks like intentional behavior, but  I can't find clarity in the spec on this.


Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1053 using your GitHub account


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

Received on Thursday, 15 January 2026 04:48:23 UTC