For making circular buttons in Bootstrap 4, I use the following CSS style:
.btn-circle {
width: 50px;
height: 50px;
padding: 6px 0px;
border-radius: 50%;
font-size: 1.5rem;
text-align: center;
}
Here is the HTML code I implement:
<button class="btn btn-primary btn-circle"><i class="fas fa-sign-out-alt"></i></button>
While everything works smoothly in Chrome browser, I encountered an issue with Firefox version 78.4 where the button momentarily turns square due to the background color applied by the .btn-primary class.
I attempted using pseudo classes like this:
.btn-primary.btn-circle:hover:active:focus {
background-color: transparent !important;
}
Unfortunately, this did not resolve the problem. Any suggestions on how I can tackle this Firefox behavior?
Update:
Removing the .btn-primary class resulted in the button having a white background in Firefox. However, the specific CSS rule causing this behavior remains unclear.