Create a multiline button with hover and focus styles.
HTML
<button type="button">Normalbutton</button>
<p>Ich bin ein Text und ich enthalte
<span class="multiline-button">
<button type="button" tabindex="-1">einen
</button><button type="button">Button,
</button><button type="button" tabindex="-1">der
</button><button type="button" tabindex="-1">als
</button><button type="button" tabindex="-1">FlieĂźtext
</button><button type="button" tabindex="-1">erscheinen
</button><button type="button" tabindex="-1">und
</button><button type="button" tabindex="-1">umbrechen</button></span>
soll</p>
<button type="button">Normalbutton</button>
CSS
.multiline-button button {
appearance: none;
border: none;
font: inherit;
background: none;
padding: 0;
outline: none;
}
.multiline-button:has(button:is(:hover,:focus)) {
border-radius: 2px;
outline: 2px solid black;
}