w3c/css-houdini-drafts

[css-typed-om] CSSUnparsedValue serialization and parsing do not roundtrip

xiaochengh opened this issue · 2 comments

The serialization of CSSUnparsedValue is specified as:

For each item in this’s [[tokens]] internal slot:
If item is a USVString, append it to s.

So CSSUnparsedValue(['1', 'px']) will be serialized as 1px, which doesn't roundtrip with parsing.

Is this intentional? If so, can we add some clarification to the spec? Or should it be fixed?

Nope, it's a mistake. I'll fix, thanks.

CSSUnparsedValue(['1', 'px']