%baz2 { display: flex; } %baz3 { display: flex; } custom2, [custom2], .custom2 { @extend %baz2 } [custom3], custom3, .custom3 { @extend %baz3 }