w3c / w3c/csswg-drafts

[css-values] Clarify fragment URLs resolve against the current tree, not document tree

Open
#3,320 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

css-values-4 topic: urls
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Right now, section 4.4.1.1. fragment URLs say that:

If a url()’s value starts with a U+0023 NUMBER SIGN (#) character, parse it as per normal for URLs, but additionally set the local url flag of the url().

When matching a url() with the local url flag set, ignore everything but the URL’s fragment, and resolve that fragment against the current document that relative URLs are resolved against. This reference must always be treated as same-document (rather than cross-document).

We text should be updated to refer to the current tree so that when the local url flag is set, the fragment is resolved against the current tree.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CSS Values and Units section 4.4.1.1, especially the local url flag definition and the paragraph describing fragment resolution. Update the wording to refer to the current tree rather than the current document, and confirm that the local URL remains same-document.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.