Re: [svgwg] Define whether <use> shadow tree is interactive

Thanks @progers. Edge is particularly fun with that one: if you hover 
the `<use>` to start, you get the red stroke, but if you start over 
the `<circle>` then shift the cursor to the `<use>`, the blue stroke 
persists.  But every browser is quirky in its own way.

The shadow DOM approach I'm working on now will at least clear up that
 issue.  Instead of saying the matched styles are being cloned from 
the original to the shadow instance, I'm saying that the stylesheets 
(external or from `<style>`) are cloned into the scope of the shadow 
tree.  (And also presentation/style attributes are cloned on each 
element, of course.)  After that, styles would get matched & cascaded 
in the shadow DOM independently from the main DOM.

In this particular case, that means that the Firefox rendering would 
be correct: the shadow `<circle>` would match `circle:hover` when it's
 hovered, and would not be affected at all when the other circle is 
hovered.

I'm also currently writing it up in such a way that the Shadow DOM 
will be fully interactive as far as gaining focus & receiving events: 
the only restrictions will be in what a script can do in response to 
those events, since the use-element Shadow DOM will remain entirely 
read-only.  Links, however, should work just fine.

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

Received on Friday, 8 July 2016 04:26:18 UTC