Alec Smart Alec Smart - 5 months ago 30
CSS Question

Remove Safari/Chrome textinput/textarea glow

I am wondering if its possible to remove the default blue and yellow glow when I click on a text input / text area using CSS?

ajm ajm
Answer
textarea, input { outline: none; }

Although, it's been argued that keeping the glow/outline is actually beneficial for accessibility as it can help users see which Element is currently focused.

You can also use the pseudo element :focus to only target the inputs when the user has them selected.

Demo: https://jsfiddle.net/JohnnyWalkerDesign/xm3zu0cf/