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

Firefox: dotted outline around focused inputs #51

Closed
silverwind opened this issue May 24, 2016 · 7 comments
Closed

Firefox: dotted outline around focused inputs #51

silverwind opened this issue May 24, 2016 · 7 comments

Comments

@silverwind
Copy link

These may be not intended:

@Randore
Copy link

Randore commented May 25, 2016

Adding { outline: medium none; } will work.

@jkochis
Copy link
Contributor

jkochis commented May 25, 2016

Please consider leaving the outline as it is. This is an important feature for users without a pointing device, such as a mouse or tap interface. If you want to remove it, at least provide alternative styling.

For more information:
http://www.outlinenone.com/

@silverwind
Copy link
Author

The border-color is already changed to indicate focus, so I'd say it's fine to remove the outline:

border-color: @core-color;

@nder
Copy link

nder commented May 25, 2016

Also outline is already cleared.

I guess it's specific to Firefox ::-moz-focus-inner behaviour, which should be easy to overcome (http://stackoverflow.com/questions/71074/how-to-remove-firefoxs-dotted-outline-on-buttons-as-well-as-links).

@silverwind
Copy link
Author

silverwind commented May 25, 2016

I've tried various -moz rules, but none seem to work in this case. What does work is adding !important to outline: 0. Really not sure why the outline of input is only appearing with spectre and not with other stylesheets.

@silverwind
Copy link
Author

silverwind commented May 25, 2016

Found the cause of this outline in normalize.css:

/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
input:-moz-focusring {
  outline: 1px dotted ButtonText;
}

The issue was fixed in necolas/normalize.css@b1f3b0c, which is released in v4.1.0.

@picturepan2 care to bump normalize.css to the latest version to resolve this?

nder added a commit to nder/spectre that referenced this issue May 30, 2016
By far, it's the newest version (https://github.com/necolas/normalize.css/tree/4.1.1).

This also fix issue with dotted outline in focused inputs in Firefox (picturepan2#51).
Kudos to @silverwind for debug and pointing out a solution.
@picturepan2
Copy link
Owner

I fixed it in ffe5499. Thanks.

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

Successfully merging a pull request may close this issue.

5 participants