Skip to content

Instantly share code, notes, and snippets.

@victorloux
Created September 13, 2018 08:47
Show Gist options
  • Save victorloux/163a4101e15b0edd1af80b33f1aeeb03 to your computer and use it in GitHub Desktop.
Save victorloux/163a4101e15b0edd1af80b33f1aeeb03 to your computer and use it in GitHub Desktop.
Transition on focus outline style
a[href],
area[href],
input:not([disabled]),
select:not([disabled]),
textarea:not([disabled]),
button:not([disabled]),
iframe,
[tabindex],
[contentEditable=true]
{
&:not([tabindex='-1'])
{
outline: 0.16em solid transparent;
outline-offset: 0.6em;
transition: outline-offset 0.1s ease-in-out, outline-color 0.1s ease-in;
&:focus {
outline-color: rgba(60, 160, 250, 0.75);
outline-offset: 0.15em;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment