While working on customizing my Bootstrap 5 navbar, I encountered an issue with changing the color of the navbar-toggler-icon. The preset colors, navbar-light and navbar-dark, didn't align with my theme, so I attempted to change the color to pure white. Unfortunately, this approach did not yield the desired result. After searching online for a solution, I found that none of the suggestions I came across resolved my specific problem. It's puzzling to me why the icon refuses to change color, especially when it seems to work perfectly for others. Therefore, I'm reaching out here in the hope that someone might have a solution that fits my needs. Here is the relevant snippet of my HTML code:
<nav class="navbar navbar-expand-lg py-0 px-3 fixed-top">
<a class="navbar-brand" href="https://www.toleka.se/" target="_blank">
<img src="https://www.toleka.se/_siteimages/favicon.ico" alt="toleka-logo" width="40" height="40" />
</a>
<button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbar">
<ul class="navbar-nav p-sm-4 p-md-0">
<li class="nav-item">
<a href="index.html" class="nav-link p-sm-3 fs-5 text-light">Home</a>
</li>
<li class="nav-item dropdown">
<a href="html/industrisakerhet/industrisakerhet.html" class="nav-link p-sm-3 fs-5 text-light"> Industrial Security </a>
</li>
<li class="nav-item">
<a href="html/trucksakerhet/trucksakerhet.html" class="nav-link p-sm-3 fs-5 text-light">Truck Safety</a>
</li>
<li class="nav-item">
<a href="html/travers/travers.html" class="nav-link p-sm-3 fs-5 text-light">Gantry Cranes</a>
</li>
<li class="nav-item">
<a href="html/logistikcenter/logistikcenter.html" class="nav-link p-sm-3 fs-5 text-light"> Logistics Center </a>
</li>
<li class="nav-item">
<a href="html/informativa-losningar/informativa-losningar.html" class="nav-link p-sm-3 fs-5 text-light"> Informative Solutions </a>
</li>
</ul>
</div>
</nav>
I've attempted various methods such as adding filters in my CSS file and directly into the element itself, using !important, adjusting properties like border-color, outline-color, and color in my CSS with !important, but unfortunately, nothing has worked. I may be missing something simple, but regardless, I appreciate any assistance. Thank you.