Commit 91cdf8c 1 parent 0753d4f commit 91cdf8c Copy full SHA for 91cdf8c
File tree 1 file changed +12
-5
lines changed
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ type RegExpArray = [string, string?];
68
68
* @internal
69
69
* @param value - Any string.
70
70
*/
71
+ const checkCssValue = ( prop : string , value : unknown ) =>
72
+ ( / c o l o r / . test ( prop ) && value === 'transparent' ) || cssValues ( prop , value ) ;
71
73
const isRegexString = ( value : string ) : value is RegExpString =>
72
74
reRegex . test ( value ) ;
73
75
/**
@@ -376,14 +378,19 @@ const ruleFunction: StylelintRuleFunction = (
376
378
}
377
379
}
378
380
381
+ if ( isExpanded ) {
382
+ console . log (
383
+ `${ nodeProp } : ${ nodeValue } -> ${ longhandProp } : ${ longhandValue } ` ,
384
+ checkCssValue ( longhandProp ! , longhandValue )
385
+ ) ;
386
+ }
387
+
379
388
// test expanded shorthands are valid
380
389
if (
381
390
isExpanded &&
382
- ignoreVariables &&
383
- ! validVar &&
384
- ignoreFunctions &&
385
- ! validFunc &&
386
- cssValues ( longhandProp , longhandValue ) !== true
391
+ ( ! ignoreVariables || ( ignoreVariables && ! validVar ) ) &&
392
+ ( ! ignoreFunctions || ( ignoreFunctions && ! validFunc ) ) &&
393
+ checkCssValue ( longhandProp ! , longhandValue ) !== true
387
394
) {
388
395
return false ;
389
396
}
You can’t perform that action at this time.
0 commit comments