File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ function gradientToFilter(gradient) {
144
144
145
145
return {
146
146
string : filterGradient ( startColor , endColor , type ) ,
147
+ isMultiColor : obj . colorStops . length > 2 ,
147
148
isFallback : result . isFallback ,
148
149
message : result . message
149
150
} ;
@@ -182,6 +183,8 @@ module.exports = postcss.plugin('postcss-filter-gradient', function (opts) {
182
183
opts = opts || { } ;
183
184
opts . angleFallback =
184
185
opts . angleFallback === undefined ? true : opts . angleFallback ;
186
+ opts . skipMultiColor =
187
+ opts . skipMultiColor === undefined ? false : opts . skipMultiColor ;
185
188
186
189
return function ( root , result ) {
187
190
root . walkRules ( function ( rule ) {
@@ -198,6 +201,10 @@ module.exports = postcss.plugin('postcss-filter-gradient', function (opts) {
198
201
if ( gradient . value ) {
199
202
filter = gradientToFilter ( gradient . value ) ;
200
203
204
+ if ( opts . skipMultiColor && filter . isMultiColor ) {
205
+ return ;
206
+ }
207
+
201
208
if ( ! opts . angleFallback && filter . isFallback ) {
202
209
return ;
203
210
}
You can’t perform that action at this time.
0 commit comments