I am currently working with a set of buttons, available at this link.
While browsing through this helpful post, I encountered an issue. Whenever I click on another element, the orange color of my button disappears. How can I maintain the orange color on the button until I choose a different one?
Below is the CSS code I am using:
.circle-button{
border-radius: 50%;
width: 20px;
height: 20px;
display: inline-block;
background: var(--button-background, rgb(110, 109, 105));
margin-left: 2px;
margin-right: 2px;
margin-top: 5px;
margin-bottom: 5px
}
.circle-button:focus{
outline: none;
--button-background: rgb(231, 153, 8);
}
.circle-button:visited{
--button-background: rgb(153, 13, 130);
}
This is how my HTML looks like:
<div class="circle-button" *ngFor="let record of imageRecords; let i = index" tabindex="{{i}}" ></div>