Reads an element's computed CSS property value.
Element whose computed style to read.
CSS property name.
The computed property value.
import { getStyle } from '@pacote/get-style'// When the body has a font size of 20px:getStyle(document.body, 'fontSize') // => '20px' Copy
import { getStyle } from '@pacote/get-style'// When the body has a font size of 20px:getStyle(document.body, 'fontSize') // => '20px'
Reads an element's computed CSS property value.