Re: [css-houdini-drafts] TypedOM returning an array of strings isn't a helpful behavior

> You're doing pure-JS animation-by-hand? Why not just use normal 
animations?

For instance, if I am reacting to the user touching the screen to 
progress the animation (swipe to dismiss, page curl animation, etc). I
 think this is one of the general use cases that the Typed OM spec 
targets. 

> Why not just use [...] more variables?

The proposal of using another variable is interesting and probably 
viable :-) That being said, it looks more like a work-around than a 
solution. TypedOM is supposed to give me access to object 
representation of values, not force me to decompose my css into a 
bunch of variables to make editing possible at all. 

While possible, it might also be impractical in some cases; if what 
you are animating is the values of a transform matrix, you would end 
up with 16 custom properties representing the 16 coefficient of the 
matrix. 

[Post Scrptum on use-case 2] I think a "parse as X property" is 
already available in the spec (see ```CSSValue.parse```), the only 
problem is that you have to split the string yourself in chuncks other
 properties can understand. 

This is something the minimalist structure would do for you. If I was 
to create a property whose content could be matricial arithmetic (e.g.
 ```scale(2) * matrix(...) + matrix(...)```), I could use my proposal 
to identify the matrix/scale/translate/etc CSSUnparsedFunctionValue(s)
 and parse them as ```transform``` using ```CSSValue.parse``` to get 
the matrix object I need. If I just had strings, it would require me 
to parse it to find out what I can delegate to "transform" in the 
first place.

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

Received on Tuesday, 24 May 2016 20:33:15 UTC