File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -569,16 +569,17 @@ export function optimizeAst(
569
569
}
570
570
571
571
if ( fallbackAst . length > 0 ) {
572
- let firstNonCommentIndex = newAst . findIndex ( ( item ) => item . kind !== 'comment' ) ?? 0
572
+ let firstNonCommentIndex = newAst . findIndex ( ( item ) => item . kind !== 'comment' )
573
+ if ( firstNonCommentIndex === - 1 ) firstNonCommentIndex = 0
573
574
newAst . splice (
574
575
firstNonCommentIndex ,
575
576
0 ,
576
577
atRule (
577
578
'@supports' ,
578
579
// We can't write a supports query for `@property` directly so we have to test for
579
580
// features that are added around the same time in Mozilla and Safari.
580
- '((-webkit-hyphens: none) and (not (margin-trim: 1lh ))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))' ,
581
- fallbackAst ,
581
+ '((-webkit-hyphens: none) and (not (margin-trim: inline ))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))' ,
582
+ [ rule ( '@layer base' , fallbackAst ) ] ,
582
583
) ,
583
584
)
584
585
}
You can’t perform that action at this time.
0 commit comments