Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Text input default :focus styles in Firefox and MS Edge #87

Closed
zachleat opened this issue Oct 18, 2016 · 5 comments
Closed

Text input default :focus styles in Firefox and MS Edge #87

zachleat opened this issue Oct 18, 2016 · 5 comments
Labels

Comments

@zachleat
Copy link
Member

Currently:
image

Unfortunately looks like it’s tied to multiple CSS properties. Specifically anything related to border and background.

https://github.com/filamentgroup/formcore/blob/master/css/formcore.css#L110-L111
https://github.com/filamentgroup/formcore/blob/master/css/formcore.css#L137
https://github.com/filamentgroup/formcore/blob/master/css/formcore.css#L260

Commenting out the above lines gives us the default back:
image

@zachleat zachleat added the bug label Oct 18, 2016
@zachleat
Copy link
Member Author

zachleat commented Oct 18, 2016

We can create and use our own outline definition here, of course. But it won’t be the OS default.

A la:
image

looks like:
image

@zachleat zachleat changed the title Text input :focus styles in Firefox Text input default :focus styles in Firefox Oct 18, 2016
@zachleat
Copy link
Member Author

Reduced test case: https://jsbin.com/yopofej/

@zachleat
Copy link
Member Author

Workaround: use :-moz-focusring instead of :focus to target a FF only outline style.

@zachleat
Copy link
Member Author

zachleat commented Oct 19, 2016

Looks like the above fix does not apply to Windows 10/Firefox 49.

image

Looks like -moz-focusring is highly platform-dependent: https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-focusring

@zachleat zachleat reopened this Oct 19, 2016
zachleat added a commit that referenced this issue Oct 19, 2016
@zachleat zachleat mentioned this issue Oct 19, 2016
@zachleat
Copy link
Member Author

Per research by @fvsch it sounds like MS Edge has the same issue: https://twitter.com/fvsch/status/788790713416839171

@zachleat zachleat changed the title Text input default :focus styles in Firefox Text input default :focus styles in Firefox and MS Edge Oct 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants