twbs / twbs/bootstrap

.list-group-item-action .list-group-item-link

Open
#39,151 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
MDX
Stars
175k
Forks
78.6k
Avg merge
7h 19m
Merged PRs (30d)
35

Description

Prerequisites
Proposal

I am requesting, please, this syntax:

<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action list-group-item-link">A second link item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-link">A third link item</a>
  <a href="#" class="list-group-item list-group-item-action list-group-item-link">A fourth link item</a>
</div>

And it would render identically to how this looks:

<ul class="list-group">
  <li class="list-group-item"><a href="#">A first link item</a></li>
  <li class="list-group-item"><a href="#">A second link item</a></li>
  <li class="list-group-item"><a href="#">A third link item</a></li>
</ul>
Screenshot 2023-09-05 at 16 15 55

The only difference is it would have the large .list-group-item-action hit targets that we love. i.e. there are no dead pixels around the link in the items.

Motivation and context

In many contexts of using list groups, it can be necessary to show a blue underline, otherwise people won't know it is clickable.

But using the ul.list-group > li.list-group-item > a syntax makes small hit targets, which are suboptimal.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Bootstrap's list-group and list-group-item-action behavior, using the HTML examples in the proposal as the acceptance target. Compare the proposed link-based markup with the existing list-group patterns and verify that the resulting item has the same appearance and full hit target without dead space.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.