Re: [css-houdini-drafts] [css-typed-om] need to specify mappings between syntax, typed OM object tree, and underlying representation

So to review, we have a few ways to represent a value:

* underlying value (abstract repr inside the implementation)
* string
* JS object

All three of these can represent specified or computed values, so six total.

We never actually go directly between strings and JS objects; we indirect thru CSS parsing into an underlying value, then reify that underlying value back up into a JS object. So the necessary linkages are 4: underlying -> string, string -> underlying, underlying -> object, object -> underlying.

* underlying -> string is defined in <https://drafts.css-houdini.org/css-typed-om/#cssom-serialization> (with a lot of properties still needing to be filled in)
* string -> underlying is not defined by this spec, it's the responsibility of CSS in general
* underlying -> object is defined in <https://drafts.css-houdini.org/css-typed-om/#reify-stylevalue> (with a lot of properties still needing to be filled in)
* object -> underlying is defined in <https://drafts.css-houdini.org/css-typed-om/#cssstylevalue-match-a-grammar>, and in the definitions of each individual type

The specified/computed split is handled by stating that the transformation of specifying => computed is *only* done in underlying values, and that's defined by CSS itself. When turning an underlying value to a string or object, the algorithms in the sections linked above distinguish between specified and computed values as appropriate. When going from string or object back to underlying value, you can only set specified values, so there's no need to worry about computed values.

------

So, to the best of my knowledge, the missing parts are just finishing out the lists in section 5.1 (underlying -> object) and 6.8 (underlying -> string) so that every single CSS property is defined, correct?

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

Received on Thursday, 26 July 2018 20:55:21 UTC