.item { display: inline-block; :has(> .ext-link) { background: #000; } } .link { color: red; } .textLink { @extend .link; padding: 0 10px; }