- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Mon, 29 Oct 2018 20:46:18 +0000
- To: public-svg-issues@w3.org
The SVG Working Group just discussed `Styling and Use Element shadow trees`. <details><summary>The full IRC log of that discussion</summary> <AmeliaBR> Topic: Styling and Use Element shadow trees<br> <AmeliaBR> Github: https://github.com/w3c/svgwg/issues/504<br> <AmeliaBR> Dirk: Amelia & I discussed this with Emilio (who posted the issue) over IRC last week.<br> <AmeliaBR> ... So, the nature of shadow trees is that style selectors from the main document don't match into the shadow tree. In SVG 2 currently, we say to copy the CSS rules into the shadow tree & then match again. But some rules wouldn't match, because the shadow tree is only part of the original tree.<br> <AmeliaBR> Dirk: This allows the approach to be more consistent with the rest of the web platform, but it doesn't match Edge/Chrome/Safari current behavior. From discussion, Microsoft in particular was against any change that wasn't backwards compatible.<br> <AmeliaBR> ... So maybe we can work with people to find a solution that is both consistent with web components and also backwards compatible.<br> <AmeliaBR> https://svgwg.org/svg2-draft/images/struct/Use-changed-styles.svg<br> <krit> https://svgwg.org/svg2-draft/struct.html#UseStyleInheritance<br> <AmeliaBR> That's the example from the spec of a rule that would change between the old or new rules.<br> <AmeliaBR> Amelia: One thing that has changed since the SVG 2 text was written is we decided to make the use shadow trees closed to author scripts. This gives us room for a little extra magic that can't be defined by regular shadow DOM.<br> <AmeliaBR> Amelia: The SVG 1 version of cloning the cascaded styles has its own problems. But the break comes specifically from selector matching. So maybe what we need is a little bit of "magic" rules for how selectors match in use-element shadow trees.<br> <AmeliaBR> ... so if a path element was cloned from somewhere it was a child of a g, then `g > path` would match the shadow path, even though there is no shadow `g`.<br> <AmeliaBR> ... but interactive selectors like `:hover` would still be assessed on that particular shadow element, not on the original.<br> <AmeliaBR> Dirk: Is this possible to implement cleanly?<br> <AmeliaBR> Amelia: It would need special code, but anything that is backwards compatible would need special code, because its unique behavior.<br> <AmeliaBR> Dirk: Ok. But I think we need a discussion with CSS & web components folks.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/svgwg/issues/504#issuecomment-434073132 using your GitHub account
Received on Monday, 29 October 2018 20:46:20 UTC