- From: Sam Atkins via GitHub <noreply@w3.org>
- Date: Fri, 19 Sep 2025 13:33:54 +0000
- To: public-houdini-archive@w3.org
AtkinsSJ has just created a new issue for https://github.com/w3c/css-houdini-drafts:
== [css-typed-om] Unclear how ==
The serialization for CSSStyleValue [says:](https://drafts.css-houdini.org/css-typed-om-1/#stylevalue-serialization)
> **if the value was constructed from a USVString**
> the serialization is the USVString from which the value was constructed.
The trouble is, that a single USVString can produce multiple CSSStyleValues. As far as I can tell, all paths go through ["parse a CSSStyleValue"](https://drafts.css-houdini.org/css-typed-om-1/#parse-a-cssstylevalue), which parses the string as a list of CSSStyleValues, optionally returning just the first one. The source string then wouldn't correspond to one CSSStyleValue, but only part of it would.
For example:
```js
// parse() means we only get the first value
var cool = CSSStringValue.parse("background", "url('cool.png'), url('rad.png')");
// Source string is "url('cool.png'), url('rad.png')" but this should only log "url('cool.png')".
console.log(cool.toString());
```
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1156 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 19 September 2025 13:33:55 UTC