Skip to content

micro-js/prefix-style

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prefix-style

Build status Git tag NPM version Code style

Prefix style objects based on browser version

Installation

$ npm install @f/prefix-style

Usage

var prefixStyle = require('@f/prefix-style')

var prefixer = prefixStyle('chrome', 34)

prefixStyle({transform: 'scale(2, 0.5)'}) // -> {
                                          //      transform: 'scale(2, 0.5)',
                                          //      webkitTransform:
                                          //    }

API

prefixStyle(browser, version)

  • browser - Name of the browser
  • version - Version number of the browser you want to prefix for

Returns: A partially applied function that accepts a style object: prefix(style) -> style and returns the same object, modified to have the proper prefixes set for the browser specified by browser and version.

License

MIT

About

Prefix style objects based on browser version

Resources

Stars

Watchers

Forks

Packages

No packages published