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

> I propose that document rules don't apply to cross-document `<svg:use>` elements. I think the model can be sound and efficient with that.

I'm tempted to agree.

 A simpler option would be: any `<style>` element or `<html:link>` element that is a child of the cloned element gets cloned (just like any other child elements) & then acts as normal inside the Shadow DOM.  That means that authors could use selector-based style rules and other advanced CSS features (media queries, keyframe animations) in their external files.  By using a linked stylesheet, they could even share styles between icons in the file without repeating the code in each symbol, although it would require an extra file download.  But, no styles need to be processed before cloning, only simple XML parsing.



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

Received on Tuesday, 23 October 2018 16:40:41 UTC