[csswg-drafts] Clarify how fragment URLs are resolved within shadow trees

AmeliaBR has just created a new issue for https://github.com/w3c/csswg-drafts:

== Clarify how fragment URLs are resolved within shadow trees ==
See https://github.com/w3c/webcomponents/issues/179, particularly https://github.com/w3c/webcomponents/issues/179#issuecomment-321324082, where @tabatkins says:

> frag urls are special in url() - https://drafts.csswg.org/css-values/#local-urls. They stay fragments and are always treated as "local" to the referencing document no matter what the base url is.
> 
> It's a small hop from there to specifying that, within a shadow tree, they are scoped to referring only to the IDs defined in the shadow. I'm fine with that - is that how we want to proceed? If so, I can bring it to the CSSWG and get it approved.

I think it would be suboptimal if references were scoped so that they _only_ refer to other shadow IDs. It would force a lot of unnecessary duplication of SVG markup if you can't reference markup in the parent tree, and would require the SVG spec to define some extra magic to explain how use element trees work.  

But we _do_ want references that are internal within the shadow tree to work, so that a complete SVG inlined within a shadow tree doesn't fall apart. I suggested a recursive search from the local tree working out.

That said, I also suggested that it would be best if this reference-matching algorithm could be defined in a consistent way for all applications. So this is more of a tracking bug, until a decision is made for the web components issue.

Related issue for discussion non-CSS cross references in SVG: https://github.com/w3c/svgwg/issues/466


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2715 using your GitHub account

Received on Monday, 28 May 2018 21:59:12 UTC