
This snippet removes the default tap highlight and focus outlines on mobile and WebKit browsers. It stops the gray/blue flash on iOS/Android when tapping and hides the default focus ring, giving you full control over how active and focused elements look.
Copy & paste the scripts before the </body> tag of your project. If you added them before for another setup, skip this step.
Place the code in an HTML widget or add it through Elementor → Custom Code (before the closing </body> tag) either globally or only on selected pages.
Paste the code through the page or site settings, or add it via Elementor → Custom Code (before </body>) for broader use.
* {
-webkit-tap-highlight-color: transparent; /* no tap flash */
-webkit-focus-ring-color: transparent; /* no blue ring */
outline: none; /* no outline */
}
img::selection {
background: transparent; /* no drag highlight */
}Paste the script through Elementor → Custom Code (set to load after </body>) for site-wide or page-specific loading.
Place the PHP snippet inside your theme’s functions.php or using any code snippet to enable logic.
Some solutions only work on the live site. Always publish and test after each change, as results may not appear in the editor.