dart-sass
dart-sass copied to clipboard
Partial sibling combinator matches should be considered superselectors
Currently the following function calls all return false:
is-superselector("a ~ c", "a ~ b ~ c")is-superselector("b ~ c", "a ~ b ~ c")is-superselector("a ~ c", "a + b + c")is-superselector("b ~ c", "a + b + c")is-superselector("b + c", "a + b + c")
They should all return true, because a ~ b ~ c and a + b + c both guarantee that c has preceding siblings that match both a and b, and a + b + c guarantees that c has an immediately preceding sibling that matches b.
Similarly, is-superselector("b > c", "a > b > c") should return true.