Re: [css-houdini-drafts] [css-typed-om] Should TypedOM "simplify away" a calc() wrapper around a single numeric value when reifying, like serialization does? (#968)

The CSS Working Group just discussed `Simplifying away calc() wrappers around single numeric values when reifying`, and agreed to the following:

* `RESOLVED: TypedOM reifies values as simplified form (mirroring getComputedStyle etc.)`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Simplifying away calc() wrappers around single numeric values when reifying<br>
&lt;TabAtkins> github: https://github.com/w3c/css-houdini-drafts/issues/968<br>
&lt;fantasai> TabAtkins: If serializing ? or used value of calc(), gets simplified down<br>
&lt;fantasai> TabAtkins: at that point, you remove the calc() wrapper if simplifies down to a single component<br>
&lt;fantasai> TabAtkins: This behavior doesn't happen in TypedOM<br>
&lt;AmeliaBR> s/?/computed/<br>
&lt;fantasai> TabAtkins: it retains the calc() wrapper<br>
&lt;fantasai> TabAtkins: not sure if we should try to adopt or not<br>
&lt;fantasai> TabAtkins: if particular impl concern, I don't have a strong opinion...<br>
&lt;fantasai> AmeliaBR: from authoring side, if you wanted to go in and manipulate the value in the wrapper and still have clamping effects of calc()<br>
&lt;fantasai> AmeliaBR: e.g. calc(-5px) in property that's positive values only<br>
&lt;fantasai> AmeliaBR: ...?<br>
&lt;fantasai> TabAtkins: if you set a calc() it'll get that behavior, if you set a simple numeric value it won't<br>
&lt;fantasai> TabAtkins: if you want to do math, can do it without having already wrapped in calc regardless<br>
&lt;fantasai> TabAtkins: in particular, emilio brought this up in a CSS isue<br>
&lt;fantasai> s/isue/issue/<br>
&lt;AmeliaBR> s/...?/Where the clamping value would be different with a plain -5px. Not sure how clamping would be different in TypedOM./<br>
&lt;fantasai> emilio: I think getComputedValue is px value because can simplify away, so I think everyone should do the same<br>
&lt;fantasai> emilio: would be annoying in implemntation to maintain that information<br>
&lt;fantasai> emilio: about whethe was wrapped in calc or not<br>
&lt;fantasai> TabAtkins: ok, propose to resolve that TypedOM reifies value as simplified form<br>
&lt;fantasai> RESOLVED: TypedOM reifies values as simplified form (mirroring getComputedStyle etc.)<br>
&lt;TabAtkins> &lt;br dur=10min><br>
</details>


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


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

Received on Friday, 31 July 2020 17:14:34 UTC