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

More accurate input focus ring #54

Open
developit opened this issue Oct 22, 2015 · 5 comments
Open

More accurate input focus ring #54

developit opened this issue Oct 22, 2015 · 5 comments

Comments

@developit
Copy link
Contributor

I'd like to suggest a more accurate (at least in terms of OS X) input focus outline/border including the nice little animation Apple added in Yosemite.

Preview:

preview

JSFiddle Demo:

http://jsfiddle.net/developit/2xpnn03s/

SCSS:

.form-control {
    box-shadow: 0 0 0 7px rgba(109,179,253,0);

    &:focus {
        box-shadow: 0 0 0 1px rgba(109,179,253,0.8);
        transition: box-shadow 250ms ease-out;
        cursor: text;
    }
}

... thoughts?

@goodseller
Copy link

That looks great! 👍

@connors
Copy link
Owner

connors commented Oct 31, 2015

@developit Rad. This is cool but we'll need to add a separate class instead of using the base .form-control. Only since .form-control is used for more things that text inputs.

@developit
Copy link
Contributor Author

Sounds like a plan, because as far as I can tell OS X only seems to use the zoom animation for some fields anyway, so perhaps the best approach is just an optional modified class that can be added to (textual) inputs. If you have a className in mind, I can do a PR.

@luizbills
Copy link

+1

1 similar comment
@KhanMaytok
Copy link

+1

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

5 participants