[csswg-drafts] [css-values-5] *Replace an attr() function* doesn't handle `raw-string` (#12370)

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

== [css-values-5] *Replace an attr() function* doesn't handle `raw-string` ==
[Replace an attr() function](https://drafts.csswg.org/css-values-5/#replace-an-attr-function) doesn't handle `raw-string` as a value. Step 4 says:

> If syntax is null, return a CSS [<string>](https://drafts.csswg.org/css-values-4/#string-value) whose value is attr value.
> NOTE: No parsing or modification of any kind is performed on the value.

...and then subsequent steps require parsing the attr value into tokens. I believe step 4 should be something like:

> If syntax is either null or `raw-string`, ...

This would agree with the [earlier text](https://drafts.csswg.org/css-values-5/#ref-for-typedef-attr-type%E2%91%A0) explaining `<attr-type>`:

> If given as the raw-string keyword, or omitted entirely, it causes the attribute’s literal value to be treated as the value of a CSS string, with no CSS parsing performed at all (including CSS escapes, whitespace removal, comments, etc).

cc: @tabatkins 

I'm happy to PR this later, I just want to check I'm understanding correctly first.

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


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

Received on Thursday, 19 June 2025 13:10:55 UTC