PostCSS plugin for generating the old IE supported filter gradient..
.foo {
/* Input example */
background: linear-gradient(to bottom, #1E5799, #7DB9E8);
}
.foo {
/* Output example */
background: linear-gradient(to bottom, #1E5799, #7DB9E8);
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#FF1E5799', EndColorStr='#FF7DB9E8');
}
npm install postcss-filter-gradient --save-dev
postcss([ require('postcss-filter-gradient') ])
The IE filter gradient only support horizontal and vertical directions, and only support two colors. If there are more than two colors in the color stops, we only pick the first and the last one.
No. We only transform the standard linear-gradient
syntax.
You can use the postcss-gradientfixer to unprefix it.
Not yet. I will add it later.
See PostCSS docs for examples for your environment.