bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Placeholder inside list-group-item has insufficient height

Open Krinkle opened this issue 2 years ago • 1 comments

Prerequisites

Describe the issue

When using placeholders for list-group-item, the placeholder have a height of 33px, compared to the "real" elements have a height of 42px.

This is reproducible on the latest stable (Bootstrap 5.1.3) as well as on 5.2.0-beta1.

Reduced test cases

  1. A placeholder (33px).
  2. A real item (42px).
  3. A placeholder with letter "X" as content to workaround this bug (42px).
<div class="container">
	<div class="col-lg-5 col-xl-4 order-1 order-lg-2 cs-reposlist placeholder-glow">
		<p class="h5">Matched repositories</p>
		<div class="list-group">
			<span class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"><span class="placeholder bg-secondary col-4"></span></span>
			<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" href="#">Bar</a>
			<span class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"><span class="placeholder bg-secondary col-6">x</span></span>
		</div>
	</div>
</div>

https://codepen.io/Krinkle/pen/dydwaEe?editors=1000

Screenshot

What operating system(s) are you seeing the problem on?

macOS, Linux

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

v5.1.3

Krinkle avatar Jun 14 '22 00:06 Krinkle

If you remove the css classes d-flex justify-content-between align-items-center on each list-group-item, you will get the expected height on these items. Placeholders will have the same current height. If you want bigger placeholders, you can use sizing modifiers: https://getbootstrap.com/docs/5.2/components/placeholders/#sizing

florianlacreuse avatar Aug 02 '22 08:08 florianlacreuse

Closing per above comment.

mdo avatar Dec 28 '22 04:12 mdo