I’m trying to get rid of the default button styling while the button is pressed. Inactive it looks like this:
On tap it looks like this:
The border appears slightly after the click and disappears shortly and disappears after a splitsecond. I don’t manage to remove the it however. The code looks like this:
HTML:
<button>This is a button</button>
CSS:
button:active {
border: none !important;
background: none !important;
}
Because the border appears slightly after the tap, it would make sense that it isn’t targetable with button:active
. What would be the right way to remove all feedback on tap?
2
Answers
Found the solution, in case anyone has the same problem:
If that doesn't work for you try adding
!important
like this: