get-prefixed-style
v1.0.0
Published
A super simple method to grab the correct (prefixed or not) style property name for your browser.
Downloads
134
Maintainers
Readme
get-prefixed-style
part of web-sparkle
A super simple method to grab the correct (prefixed or not) style property name for your browser.
Usage
$ npm install get-prefixed-style
var getPrefixedStyle = require('get-prefixed-style')
var _transition = getPrefixedStyle('transition')
var _transform = getPrefixedStyle('transform')
document.body.style[_transition] = _transform + ' 300ms ease-in-out'
Reference
getPrefixedStyle(style)
Get the value of the adjusted style property name.
Params
- style
String
- the unprefixed name of your style property.
Returns
Function
- the valid style property name, prefixed or not, depending on the browser.
Development
To run the example locally, run the following commands:
npm install
npm run dev
npm start
Credits
This readme is maintained by [email protected].
License
MIT