Re: [csswg-drafts] [css-values] attr()'s url type seems wrong (#5079)

Just printing the `href` value after an `<a>` also works mostly acceptable if the attribute value is treated as a string, not an actual URL, but doesn’t this resolution break the most common use case of the `target-…()` functions from [css-content](https://drafts.csswg.org/css-content-3/#cross-references)?

~~~~ css
/* cross reference origins */
a:local-link::after, a[href^=#]::after {
  content: " on page " 
    target-counter(
      attr(href type(<url>)),
      page
    );
~~~~

The IDREF value therein comes from an attribute so often that the spec still mentions a decade-old proposal by @fantasai to just use an attribute name as the first parameter of the functions:

~~~~ css
  content: " on page " 
    target-counter(
      href,
      page
    );
~~~~

-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5079#issuecomment-3337228453 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 26 September 2025 07:56:52 UTC