Skip to content

Commit 6712e6d

Browse files
skip decls/rules if they are inside a @supports(--)
Fix bug with '@include breakpoint' inside '@supports(--)'
1 parent 0eb1802 commit 6712e6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ function ruleIsInCssSupportsRule(rule) {
5050
function checkIsCssSupportsRule(node) {
5151
if(node.type == 'atrule' && node.name === 'supports' && [].concat(node.params)[0].indexOf('--') > -1) {
5252
return true;
53+
} else if(node.parent) {
54+
// this checks for multiple nesting -> e.g, @include breakpoint inside @support
55+
return checkIsCssSupportsRule(node.parent);
5356
}
5457
return false;
5558
};

0 commit comments

Comments
 (0)