[svgwg] 'stop-color' property resolving with 'inherit' value

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

== 'stop-color' property resolving with 'inherit' value ==
>From the spec, it's not clear when an `inherit` resolving should stop. According to the results below, I can assume that for `defs` it should stop on the `defs` child itself, but it's not clear.

Is it specified in the spec somewhere?

[`stop-color` in SVG 1.1](https://www.w3.org/TR/SVG11/pservers.html#StopColorProperty)
[`stop-color` in SVG 2](https://svgwg.org/svg2-draft/pservers.html#StopColorProperty)

Example:

```xml
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
    <g stop-color="green">
        <defs>
            <linearGradient id="lg1">
                <stop offset="0" stop-color="yellow"/>
                <stop offset="1" stop-color="inherit"/>
            </linearGradient>
        </defs>
    </g>

    <rect x="20" y="20" width="160" height="160" fill="url(#lg1)"/>

    <rect x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>

```

Results:

![1541972581](https://user-images.githubusercontent.com/725494/48318607-ef61e880-e60b-11e8-8fee-df8c4b9fc8fc.png)


I'm asking about `stop-color` specifically, because for other properties it works fine. For example this will be resolved to green in all applications:

```xml
    <g fill="green">
        <defs>
            <mask id="mask1">
                <rect id="rect1" x="20" y="20" width="160" height="160" fill="inherit"/>
            </mask>
        </defs>
    </g>
```

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

Received on Sunday, 11 November 2018 21:55:39 UTC