Skip to content

Adds vendor prefixes to an object of styles through autoprefixer

Notifications You must be signed in to change notification settings

UXtemple/autoprefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autoprefix

Adds vendor prefixes to an object of styles through autoprefixer.

Works best in combination with react-autoprefix babel plugin to auto prefix your inline styles at compilation time :).

Build Status

Installation

$ npm install autoprefix

Usage

require('autoprefix')({
  alignItems: 'center',
  background: 'linear-gradient(350.5deg, white, black), linear-gradient(-130deg, black, white), linear-gradient(45deg, black, white)'
});

// =>
//
// {
//   webkitBoxAlign: 'center',
//   webkitAlignItems: 'center',
//   msFlexAlign: 'center',
//   alignItems: 'center',
//   background: ['-webkit-linear-gradient(99.5deg, white, black), -webkit-linear-gradient(220deg, black, white), -webkit-linear-gradient(45deg, black, white)', 'linear-gradient(350.5deg, white, black), linear-gradient(-130deg, black, white), linear-gradient(45deg, black, white)']
// }

Initially inspired by react-css.

Locked to a synchronous version of autoprefixer to allow for the babel plugin for react.

About

Adds vendor prefixes to an object of styles through autoprefixer

Resources

Stars

Watchers

Forks

Packages

No packages published