2.0.3 • Published 9 months ago

@pacote/get-style v2.0.3

Weekly downloads
141
License
MIT
Repository
-
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.3

9 months ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago