preflex

1.0.1 • Public • Published

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

/preflex/

    Package Sidebar

    Install

    npm i preflex

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • bendrucker