Description
Replace an attr() function doesn't handle raw-string
as a value. Step 4 says:
If syntax is null, return a CSS 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 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.