hallvors / postcss-gradientfixer

PostCSS plugin to rewrite CSS gradients code with existing vendor prefixes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostCSS gradientfixer Build Status

PostCSS plugin to rewrite code with existing vendor prefixes (especially -webkit-) on CSS gradients and add equivalent un-prefixed CSS.

For example, here's some CSS with vendor-specific prefix and a gradient syntax based on older versions of the CSS specifications:

.foo {
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), to(#f0efe7));
}

The unprefixer plugin will add the equivalent standard declarations (while leaving the old CSS for backwards compatibility with older WebKit-based browsers):

.foo {
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), to(#f0efe7));
  background: linear-gradient(to bottom, #ffffff 0%, #f0efe7 100%);
}

Usage

postcss([ require('postcss-gradientfixer') ])

See PostCSS docs for examples for your environment.

About

PostCSS plugin to rewrite CSS gradients code with existing vendor prefixes

License:Mozilla Public License 2.0


Languages

Language:JavaScript 100.0%