CSS Typed Object Model: Animating and Reading CSS Values with JavaScript
The CSS Typed Object Model: read and set CSS values as numbers Reading a style in JavaScript returns strings: getComputedStyle( el ).width is "320px", and changing a value means building a string like `${ x }px`. Parsing and concatenating units is a source of small bugs and of work on every animation frame. The CSS…