Upon inspecting the Bootstrap 5 accordion, I noticed an outline that I would like to remove. I believe the element responsible for this outline may be the button
. Despite attempting to target all possible elements with the following code:
.accordion-item, .accordion-item:focus, .accordion-item:active,
.accordion-header, .accordion-header:focus, .accordion-header:active,
.accordion-button, .accordion-button:focus, .accordion-button:active {
outline: none !important;
}
Unfortunately, none of these attempts seem to be effective. Do you have any suggestions on how to remove this outline?
Here is the HTML code snippet for reference:
<div class="accordion" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Accordion Item #1
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body">
...
</div>
</div>
</div>
</div>