twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
170.93k stars 78.88k forks source link

Accordion flush in card has missing corners on bottom #40991

Closed ianw closed 3 weeks ago

ianw commented 3 weeks ago

Prerequisites

Describe the issue

When I put an accordion in flush mode inside a card the bottom is slightly broken up

Screenshot from 2024-10-29 14-10-06

Screenshot from 2024-10-29 14-10-06-2

There isn't an exact example of the accordion in a card, but there is a of flush list-group in https://getbootstrap.com/docs/5.3/components/card/ and I feel like I'm doing the same thing where you basically have the accordion after the card-header

 <div class="card">
    <div class="card-header">
         Header
     </div>
      <div class="accordion accordion-flush" id="accordionExample">
     ... accordion follows ...

I see this in Firefox and Chrome on the codepen example below

Reduced test cases

A codepen example of this is https://codepen.io/iwienand/pen/LYwdELE

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

Linux

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

Chrome, Firefox

What version of Bootstrap are you using?

v5.3

coliff commented 3 weeks ago

Cards have border-radius by default so I'd suggest simply adding the 'rounded-0' utility class to the .card to fix it.

julien-deramond commented 3 weeks ago

Cards have border-radius by default so I'd suggest simply adding the 'rounded-0' utility class to the .card to fix it.

Thanks, coliff! This is definitely the way to go. Since a card is treated as a simple container, the framework doesn't apply special CSS for handling specific combinations of components within the card. I'm closing this issue.