2.0.2 • Published 9 months ago

@pacote/get-style v2.0.2

Weekly downloads
141
License
MIT
Repository
github
Last release
9 months ago

@pacote/get-style

version minified minified + gzip

Get an element's computed style for the provided CSS property.

Installation

yarn add @pacote/get-style

Usage

import { getStyle } from '@pacote/get-style'

// When the body element has `font-size: 20px`.
getStyle(document.body, 'fontSize') // => '20px'

getStyle(element: HTMLElement, property: string): string

getStyle() takes an element and the CSS property to fetch and returns its computed value.

License

MIT © Luís Rodrigues.

2.0.2

9 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago