Re: [csswg-drafts] [css-syntax] Give up on <urange> production? (#8835)

> Do custom properties not work if an implementation saves tokens? (Regardless of whether it might prefer a string as it’s more compact in memory)

Yes, there's a very explicit requirement for saving the original string representation (or enough information to reconstruct it), because of things like putting numeric-ish data into custom properties (for non-CSS purposes) and expecting it to come out unmangled by serialization when they read it later.  See <https://drafts.csswg.org/css-variables/#serializing-custom-props> (particularly the Note at the end of the section) and the discussion at <https://logs.csswg.org/irc.w3.org/css/2016-09-19/#e722375>.

I mean, you can save tokens, so long as each one *individually* remembers the bit of the string it was parsed from. There's no observable difference between that and saving the entire property value as a unit.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8835#issuecomment-1555035958 using your GitHub account


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

Received on Friday, 19 May 2023 17:58:01 UTC