Order #10421
Ana Kim · 3 items · $129.00
Make a whole card clickable with one real link inside it. Add .stretched-link to the link: its click area covers the card. Other buttons and links in the card still work on their own.
Ana Kim · 3 items · $129.00
Marco Rossi · 1 item · $48.50
<div class="card-grid">
<article class="card card-body stack gap-2">
<span class="badge badge-green self-start">Paid</span>
<h3 class="m-0 text-lg"><a class="stretched-link link-reset" href="#">Order #10421</a></h3>
<p class="m-0 text-sm text-muted">Ana Kim · 3 items · $129.00</p>
<div class="hstack mt-2"><span class="spacer"></span><button class="btn btn-sm" type="button" data-momo-toast="Receipt sent">Email receipt</button></div>
</article>
<article class="card card-body stack gap-2">
<span class="badge badge-yellow self-start">Pending</span>
<h3 class="m-0 text-lg"><a class="stretched-link link-reset" href="#">Order #10420</a></h3>
<p class="m-0 text-sm text-muted">Marco Rossi · 1 item · $48.50</p>
<div class="hstack mt-2"><span class="spacer"></span><button class="btn btn-sm" type="button" data-momo-toast="Reminder sent">Remind</button></div>
</article>
</div>Click anywhere on a card to follow its link, or the button to do just that. Pressing Tab onto the link draws the focus ring around the whole card.
The click area covers the nearest box with a position: cards and boxes already have one; for anything else add .relative. Put only one stretched link in a box.