Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify how fragment URLs are resolved within shadow trees #2715

Open
AmeliaBR opened this issue May 28, 2018 · 1 comment
Open

Clarify how fragment URLs are resolved within shadow trees #2715

AmeliaBR opened this issue May 28, 2018 · 1 comment

Comments

@AmeliaBR
Copy link
Contributor

See WICG/webcomponents#179, particularly WICG/webcomponents#179 (comment), 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: w3c/svgwg#466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants