css-houdini-drafts icon indicating copy to clipboard operation
css-houdini-drafts copied to clipboard

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

Open xiaochengh opened this issue 4 years ago • 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?

xiaochengh avatar Mar 01 '21 19:03 xiaochengh

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

tabatkins avatar Mar 02 '21 01:03 tabatkins

CSSUnparsedValue(['1', 'px']

zaylababy avatar May 06 '21 08:05 zaylababy