Coffeekraken.io 0.0.1

getStyleProperty

Get a style property on the passed element through the computed style. This function try to store the actual style to not trigger more that 1 redraw each js execution loop.

Name Type Description Status Default
elm { HTMLElement } The element to get style from required
property { String } The css property to get required

Return { Mixed } The style value

Example

    import getStyleProperty from 'sugarcss/js/dom/getStyleProperty'
const opacity = getStyleProperty(myCoolHTMLElement, 'opacity');

See more : https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle

Author : Olivier Bossel olivier.bossel@gmail.com