How to remove the blue highlight of button on mobile?

When trying to create buttons, links or input fields using latest development technologies like next js, react and angular etc there might be some times a default background color may appear. This can cause bugs for the developed website since they create a different background color different from the mockup.

As solution we can use a default style saying not to set default styles when user taps on the button.

input,
textarea,
button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

This makes the default style disappears in all browsers when user clicks on the content.

Leave a comment

Your email address will not be published. Required fields are marked *