getcssstyle
v0.0.4
Published
An optimized, cross-browser, high-performance, well-coded and lightweight CSS-Style Getter for JavaScript and Javascript-based animation/tweening engine that runs anywhere
Downloads
17
Maintainers
Readme
getCSSStyle
An optimized, cross-browser, high-performance, well-coded and lightweight CSS-Style Getter for JavaScript and Javascript-based animation/tweening engine that runs anywhere
CDN
# unpkg
https://unpkg.com/getcsstyle
# npmcdn
https://npmcdn.com/getcsstyle
# jsDelivr
https://cdn.jsdelivr.net/npm/getcsstyle
Installing
$ npm install getcsstyle
# or
$ yarn add getcsstyle
Usage
var getcss = require('getcsstyle');
var computedcss = getcss.CSSComputedStyle;
var toAnimation = {width:'200px', height:'300px'};
var fromAnimation = computedcss(myElement, toAnimation) // {width:...,height:...};
// Returns value for specified properties
Methods
CSSComputedStyle
Like getComputedStyle
, but cleaner API, better compatibility and transforms supported (actual non-matrix value returns)
CSSTransformOrigin
Returns origin and bounds of source
Prefix
Returns prefixed your property