`.accordion-flush` does not remove `background-color`
Created by: taesungh
Prerequisites
-
I have searched for duplicate or closed issues -
I have validated any HTML to avoid common problems -
I have read the contributing guidelines
Describe the issue
The Bootstrap documentation for the Flush Accordion component claims
Add
.accordion-flush
to remove the defaultbackground-color
, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.
However, looking at the actual source code for .accordion-flush
(_accordion.scss:125:149), there are no styles which actually affect the background-color
property.
Is this simply an oversight in the documentation, or should the Flush Accordion actually remove the default background color? This was also briefly mentioned in discussion #34339.
Reduced test cases
Basic demo with flush accordion used within an element with background color: https://codepen.io/taesungh/pen/VwBjmmY
If removing the background is desired, I think the simplest fix is using
.accordion-flush {
--#{prefix}accordion-bg: transparent;
--#{prefix}accordion-active-bg: transparent;
}
but this might interfere with #37508. Otherwise, I think the documentation should be updated accordingly.
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Safari
What version of Bootstrap are you using?
v5.2.3