units
units copied to clipboard
Got units? Convert them! Parse length, angle and resolution CSS values and convert between units.
I recently discovered the SVG DOM API provides some builtin unit conversion functionality. It would not be applicable to all cases, but I suspect it could possibly be more reliable...
Tweak inline styles so that getCreatedElementDimensions is more robust to CSS cascading rules
For vertical-align, the two numeric values it can take are percentage and length. - Length in this case is offset from text's baseline - Percentage is offset from baseline as...
This library was required from a Node Canvas dependency in our app and was failing because our code was initialised in the head rather than the body, so document.body didn't...
When you try to convert from PX to % on an element, which is a child of body and has fixed position, it will throw an error on utilities.getRelativeElementDimension, when...
Bumps [lodash](https://github.com/lodash/lodash) from 3.10.1 to 4.17.19. Release notes Sourced from lodash's releases. 4.17.16 4.0.0 lodash v4.0.0 2015 was big year! Lodash became the most depended on npm package, passed 1...
Allow to set al already calculated number instead of an element to allow server-side rendering as proposed at #1. Also it fixed some places where element could be optional instead...
The problem with server side rendering is that window doesnt exist. Neiter can it look what px the body has. Would be nice if the prop element also could be...
### Hello! Thank you for your module. I noticed useSelf was false when using those properties as fourth argument: `units.convert("px", "10%", myElement, "offsetWidth")` This was generating wrong results, since the...
Allows TypeScript programmers to use this module.