Skip to content

hallvors/postcss-gradientfixer

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published