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
SatyaOP2y 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
Jochem2y 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
SatyaOP2y 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
AparAwasthi2y ago
So which button is in question here?
Satya
SatyaOP2y ago
@aparawasthi the nav button
Satya
SatyaOP2y ago
this one
Mannix
Mannix2y ago
apparently -webkit-tap-highlight-color: transparent; should do the job
Satya
SatyaOP2y ago
Worked! Thanks @mannix_

Did you find this page helpful?