<===> input.scss
%matches {
  :matches(oh, no) {
      x: 1;
      y: 2;
  }
}
matches {
  @extend %matches;
  @extend oh;
}

%any {
  :any(oh, no) {
      x: 1;
      y: 2;
  }
}
any {
  @extend %any;
  @extend oh;
}

<===> output.css
matches :matches(oh, any, matches, no) {
  x: 1;
  y: 2;
}

any :any(oh, any, matches, no) {
  x: 1;
  y: 2;
}