Repository navigation
Conversation
|
@tabatkins, do you know what the plan is to move this stuff to, presumedly, the URL spec and HTML? |
marcoscaceres
left a comment
There was a problem hiding this comment.
This is great, @tabatkins! Thank you. Some suggestions.
Co-authored-by: Dan Clark <daniec@microsoft.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
whatwg/html#8282 has the plan to merge into HTML and links to a PR. |
jyasskin
left a comment
There was a problem hiding this comment.
@tabatkins Having looked into this, I'm not sure that CSS link params are actually doing the right thing for SVG, whose MIME type says it uses the XPointer style for fragments. We ought to be consistent for params-in-links, so maybe we need to say that SVG also allows its XPointer stuff to live after the fragment-directive :~: introduction...
Co-authored-by: Jeffrey Yasskin <jyasskin@gmail.com>
Co-authored-by: Jeffrey Yasskin <jyasskin@gmail.com>
Co-authored-by: Jeffrey Yasskin <jyasskin@gmail.com>
jyasskin
left a comment
There was a problem hiding this comment.
I've filed w3c/csswg-drafts#14830 to get (the CSS folks to file a bug to get) SVG to recognize fragment directives. I think the advice here is good to go.
|
This looks great to me! |
I'm proposing a new guidance, to always use "fragment directives" when defining new things that go in the fragment of a URL.
In CSS Link Params I initally copied SVG's fragment directives when defining how to pass link Params directly in a URL, but it was pointed out in w3c/csswg-drafts#14235 that I should instead be relying on fragment directives, as defined by the Scroll To Text Fragment spec.
The fragment directive concept was designed with careful attention to compat and how it should be exposed to various DOM APIs, and is generally a much better structure than the general fragment, which is unstructured and heavily used by authors, which makes it hard to impose any structure.
Text fragments are the only currently-shipping feature using fragment directives, but link params will be the second, and we should encourage further use of this feature instead of letting people unknowingly repeat the legacy mistakes of SVG and Media Fragments.
Preview | Diff