Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize button::moz-inner-focus for Firefox #2373

Closed
hbharding opened this issue Sep 25, 2019 · 1 comment
Closed

Normalize button::moz-inner-focus for Firefox #2373

hbharding opened this issue Sep 25, 2019 · 1 comment
Assignees

Comments

@hbharding
Copy link
Contributor

hbharding commented Sep 25, 2019

Originally mentioned in #2365.

While tabbing through components, Firefox shows a grey dotted border for some component's :focus state. This appears to only happen when hitting tab. Manually setting :focus in dev tools doesn't seem to trigger it. I'm not 100% sure, but from limited testing I think this focus style only applies to <button> elements.

If we decide to, we could normalize this behavior by doing something like:

# normalize.scss
button::moz-inner-focus {
  border: 0
}

image
image

@myasonik
Copy link
Contributor

I had actually just gone ahead and done it in #2193 and no one said boo. But it was reverted due to some upgrade issues in Kibana...

It does seem like EUI's intent is to remove the default browser focus and provide our own custom one so I'm on board with removing it.

I think the property is ::-moz-focus-inner not ::moz-inner-focus though. When trying to confirm it, I also found :moz-focusring which seems to be their currently preferred API. (Couldn't find any official docs for either of the other options.)

Codepen showing *:-moz-focusring { outline: none !important } works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants