getStyleProperty

Type:Function
Status:beta
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.style

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.

Params

  1. $elm*-HTMLElement

    The element to get style from

  2. property*-String

    The css property to get

Return

  1. -Mixed

    The style value

Example

import { getStyleProperty } from '@blackbyte/sugar/dom'
const opacity = getStyleProperty($myCoolHTMLElement, 'opacity');

Todo

  • testsnormal