compute-style

get the computer style property of an HTML element

Usage no npm install needed!

<script type="module">
  import computeStyle from 'https://cdn.skypack.dev/compute-style';
</script>

README

compute-style

returns an object with style information on an element.

npm install compute-value

USAGE

It's a function that takes two parameters: the element, and the style property


var getCSS = require('compute-style')

var primitiveValue = getCSS(element, 'width').primitive.val