Skip to content

Commit

Permalink
Fix false negative about -ms-linear-gradient in `function-linear-gr…
Browse files Browse the repository at this point in the history
…adient-no-nonstandard-direction` (#6031)
  • Loading branch information
ybiquitous committed Apr 22, 2022
1 parent ae7d1ef commit 7957260
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Expand Up @@ -94,6 +94,9 @@ testRule({
{
code: '.foo { background: url(foo.png), -o-linear-gradient(bottom, #fff, #000 ), url(bar.png); }',
},
{
code: '.foo { background: url(foo.png), -ms-linear-gradient(bottom, #fff, #000 ), url(bar.png); }',
},
],

reject: [
Expand Down Expand Up @@ -289,6 +292,14 @@ testRule({
endLine: 1,
endColumn: 62,
},
{
code: '.foo { background: url(foo.png), -ms-linear-gradient(to bottom, #fff, #000), url(bar.png); }',
message: messages.rejected,
line: 1,
column: 54,
endLine: 1,
endColumn: 63,
},
],
});

Expand Down
Expand Up @@ -63,7 +63,7 @@ const rule = (primary) => {

functionArgumentsSearch(
valueParser.stringify(valueNode).toLowerCase(),
/^(-webkit-|-moz-|-o-)?linear-gradient$/i,
/^(-webkit-|-moz-|-o-|-ms-)?linear-gradient$/i,
(expression, expressionIndex) => {
const args = expression.split(',');
const firstArg = (args[0] || '').trim();
Expand Down

0 comments on commit 7957260

Please sign in to comment.