[svgwg] SVG Params alternative: seamless (#793)

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

== SVG Params alternative: seamless ==
It would often be helpful if you could use css in external SVG images, and background images.
One approach was this one:
https://tabatkins.github.io/specs/svg-params/

My idea now is that similar to the once discussed seamless attribute for iframes, css is just forwarded.

```html
<img src="image.svg" seamless style="color:red; --strongness:2">
```

```svg
image.svg:

<svg>
    <path style="fill : currentColor; /*red*/; stroke-width:var(--strongness)" ... />
</svg>
```

proposal for background-images:
```css
img::background {
    background-image : url( image:svg );
    background-image-styles: seamless;
}
```

### security concerns
Width just injected CSS one can steal possible user-dependent CSS (` --username : tina98 `)

#### solutions
- Allow seamless only for same origin resources or
- Define the properties that will deletage: `background-image-params : --strongness, color`



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

Received on Wednesday, 22 April 2020 00:41:08 UTC