preflex
v1.0.1
Published
Dynamically add vendor flexbox prefixes to CSS style dictionaries
Downloads
9
Maintainers
Readme
preflex
Dynamically add vendor flexbox prefixes to CSS style dictionaries
Install
$ npm install --save preflex
Usage
// In Safari
var prefix = require('preflex')
prefix({flex: 1})
//=> {flex: 1, webkitFlex: 1}
prefix({display: 'flex'})
//=> {display: '-webkit-flex'}
API
prefix(obj)
-> object
Returns a copy of the original object with both the standard flexbox property and the prefixed version.
obj
Required
Type: object
An object containing CSS style properties. Keys should be camel cased, e.g. flex-direction
should be flexDirection
.
License
MIT © Ben Drucker