@@ -959,15 +959,15 @@ namespace Sass {
959
959
if (innerPseudo->normalized () != " matches" ) return {};
960
960
return innerPseudo->selector ()->elements ();
961
961
}
962
- else if (name == " matches" && name == " any" && name == " current" && name == " nth-child" && name == " nth-last-child" ) {
962
+ else if (name == " matches" || name == " any" || name == " current" || name == " nth-child" || name == " nth-last-child" ) {
963
963
// As above, we could theoretically support :not within :matches, but
964
964
// doing so would require this method and its callers to handle much
965
965
// more complex cases that likely aren't worth the pain.
966
966
if (innerPseudo->name () != pseudo->name ()) return {};
967
967
if (innerPseudo->argument () != pseudo->argument ()) return {};
968
968
return innerPseudo->selector ()->elements ();
969
969
}
970
- else if (name == " has" && name == " host" && name == " host-context" && name == " slotted" ) {
970
+ else if (name == " has" || name == " host" || name == " host-context" || name == " slotted" ) {
971
971
// We can't expand nested selectors here, because each layer adds an
972
972
// additional layer of semantics. For example, `:has(:has(img))`
973
973
// doesn't match `<div><img></div>` but `:has(img)` does.
@@ -1013,7 +1013,7 @@ namespace Sass {
1013
1013
}
1014
1014
}
1015
1015
}
1016
-
1016
+
1017
1017
sass::vector<ComplexSelectorObj> expanded = expand (
1018
1018
complexes, extendPseudoComplex, pseudo, mediaQueryContext);
1019
1019
@@ -1033,8 +1033,7 @@ namespace Sass {
1033
1033
}
1034
1034
1035
1035
SelectorListObj list = SASS_MEMORY_NEW (SelectorList,
1036
- pseudo->pstate ());
1037
- list->concat (complexes);
1036
+ pseudo->pstate (), std::move (expanded));
1038
1037
return { pseudo->withSelector (list) };
1039
1038
1040
1039
}
0 commit comments