1.0.1 • Published 8 years ago

preflex v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

preflex Build Status

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