Button Touchscreen Interaction

Hi, when I'm tapping on a button on touchscreen devices I see a square background for a short while. How do I remove that? I've tried adding
outline:none
outline:none
to
:active :focus
:active :focus
states but that doesnt work. I'm sorry if I didnt explain the issue that well.
8 Replies
Satya
SatyaOP17mo ago
Also, I'm not able to take a screenshot as it happens so fast. I dont know if I'm allowed to post a link here. I can give a link to the website.
Jochem
Jochem17mo ago
you can link it if it's to demonstrate the problem you shouldn't remove outlines in general though, they're an accessibility feature
Satya
SatyaOP17mo ago
https://www.satya.vercel.app it's a work-in-progress website. The button I'm talking about is the menu button on the navbar (which only appears for small screen devices)
Satya Patra
Web site created using create-react-app
AparAwasthi
AparAwasthi17mo ago
So which button is in question here?
Satya
SatyaOP17mo ago
@aparawasthi the nav button
Satya
SatyaOP17mo ago
this one
Mannix
Mannix17mo ago
apparently -webkit-tap-highlight-color: transparent; should do the job
Satya
SatyaOP17mo ago
Worked! Thanks @mannix_
Want results from more Discord servers?
Add your server