r/learnreactjs • u/BilboMcDoogle • Jun 01 '22
How do you get rid of outlines? Are they automatic?
https://i.imgur.com/fu8SwoV.png
Im using styled-components and don't have outline specified anywhere in the CSS so IDK where this is coming from.
IDK if you can see it but when I put my cursor over the circle (a link) I get "outline: 1px dashed red". I don't want that. Because I didn't specify it I don't know how to get rid of it.
Is it because it's an img tag? or a href? Is there something that by default uses that red dashed outline on hover? How come this is happening and how do I stop it?
5
Upvotes
1
u/Ih8sn0w Jun 01 '22
I'm pretty sure that's from a browser extension, perhaps Imagus?
1
u/Justindr0107 Jun 02 '22
Removing the outline totally is bad for accessibility. Removing it from hover is one thing but you want it to be on focus. I would look into restyling it instead of removal
1
u/young-king-1283 Jun 02 '22
There are default css properties and outline is one of those, you can use Eric Meyer's css reset or you can add this on your main css * { outline: none }