- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 09 Nov 2017 18:01:23 +0000
- To: public-houdini-archive@w3.org
The Working Group just discussed `What should CSSNumericValue.type() do?`, and agreed to the following resolutions: * `RESOLVED: type() will be a map of units to powers` <details><summary>The full IRC log of that discussion</summary> <nainar> Topic: What should CSSNumericValue.type() do?<br> <nainar> Github: https://github.com/w3c/css-houdini-drafts/issues/482<br> <nainar> TabAtkins: before calc stuff type was easy - returned string with unit or generic thing like length<br> <nainar> TabAtkins: difficult due to calc stuff. Map of type to power.<br> <nainar> TabAtkins: Q now is what form is type in JS. Simple answer: object literal from type to integer powers.<br> <nainar> dbaron: omitt things that are 0?<br> <nainar> TabAtkins: Not always. Type maps keeps track of 0 things. Cant add pixel to s/s<br> <nainar> TabAtkins: incompatible expression .<br> <nainar> TabAtkins: one type thaat is pixel. Other one is a mathdivide of s/s<br> <nainar> dbaron: its unitless?<br> <nainar> TabAtkins: its unit is still time?<br> <nainar> dbaron: ...<br> <nainar> TabAtkins: I remember preserving zero types for a reason...<br> <nainar> TabAtkins: If I can remember why there may have been zero types at one point.<br> <nainar> dbaron: will there be a simple way to access abstract dimension of unit?<br> <nainar> dbaron: eg px diided by em. Remember that px/em but abstractally itss unitless<br> <nainar> TabAtkins: yes that is what the type map tracks and returns<br> <TabAtkins> https://drafts.css-houdini.org/css-typed-om/#numeric-typing<br> <nainar> TabAtkins: describes how to produce a type from various things...<br> <nainar> TabAtkins: maps categories to powers<br> <nainar> TabAtkins: One limitaation - general caswe - where you are trying to handles % correctly. Hvave to do type inference to see if expression is avllid. There are some compocated div case that shoudl work but are rejected by my expression<br> <nainar> dbaron: this is becaue you arent converting % to what it si equivalent to<br> <nainar> TabAtkins: So i nedto checkthat if % wa converted to a valid typed would it be a valid type?<br> <nainar> TabAtkins: Just returning a map is simple and does job - in simple cases it is more complicated than needed. this addressed general case?<br> <nainar> fremy: Can we get a helper that gets type and returns whether the map is of that type?<br> <nainar> TabAtkins: Yes to and to Sum fucntion takes input and throws if it cant convert.<br> <nainar> RESOLVED: type() will be a map of units to powers<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/482#issuecomment-343238938 using your GitHub account
Received on Thursday, 9 November 2017 18:01:25 UTC