File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18891,7 +18891,7 @@ mod tests {
1889118891 }
1889218892 "#,
1889318893 indoc! {r#"
18894- .baz .foo .bar {
18894+ .baz :is( .foo .bar) {
1889518895 background: green;
1889618896 }
1889718897 "#},
Original file line number Diff line number Diff line change @@ -966,6 +966,7 @@ where
966966 let mut combinators = selector. iter_raw_match_order ( ) . rev ( ) . filter_map ( |x| x. as_combinator ( ) ) ;
967967 let compound_selectors = selector. iter_raw_match_order ( ) . as_slice ( ) . split ( |x| x. is_combinator ( ) ) . rev ( ) ;
968968
969+ let mut first = true ;
969970 let mut combinators_exhausted = false ;
970971 for mut compound in compound_selectors {
971972 debug_assert ! ( !combinators_exhausted) ;
@@ -984,8 +985,9 @@ where
984985 continue ;
985986 }
986987
987- let has_leading_nesting = matches ! ( compound[ 0 ] , Component :: Nesting ) ;
988+ let has_leading_nesting = first && matches ! ( compound[ 0 ] , Component :: Nesting ) ;
988989 let first_index = if has_leading_nesting { 1 } else { 0 } ;
990+ first = false ;
989991
990992 // 1. If there is only one simple selector in the compound selectors
991993 // which is a universal selector, append the result of
You can’t perform that action at this time.
0 commit comments