Re: [svgwg] Need to better define what rules apply to an element in an <svg:use> subtree. (#504)

> From an author point of view, applying all rules as if the elements were not referenced via <use> elements is the expected behavior. It feels awkward when rules that normally apply to elements do not apply to them when they are referenced.

That's not the semantics of SVG 1. The semantics of SVG one mean that for this test-case:

```html
<!doctype html>
<style>
  rect {
    fill: red;
  }
  rect:hover {
    fill: green;
  }
</style>
<svg width=300 width=300>
  <g id="canvas">
    <rect width=100 height=100></rect>
  </g>
  <use x=200 y=0 href="#canvas"></use>
</svg>
```

For SVG 1, you get two green squares when you hover over the square to the right.

For SVG 2, it behaves as you expect.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/504#issuecomment-532966555 using your GitHub account

Received on Thursday, 19 September 2019 05:00:37 UTC