Skip to content

Instantly share code, notes, and snippets.

@phun-ky
Created July 8, 2019 06:34
Show Gist options
  • Save phun-ky/628bc764ddbbb8340b0422357ea8edab to your computer and use it in GitHub Desktop.
Save phun-ky/628bc764ddbbb8340b0422357ea8edab to your computer and use it in GitHub Desktop.
// Reset focus styles for everything
:not(body):focus {
outline: none;
}
a[href]:focus,
area[href]:focus,
button:focus,
details:focus,
input:focus,
iframe:focus,
select:focus,
textarea:focus,
[contentEditable=""]:focus,
[contentEditable="true"]:focus,
[contentEditable="TRUE"]:focus,
[tabindex]:not([tabindex^="-"]):focus,
:not([disabled]):focus,
:not(body):focus,
:not(td):focus,
:not(th):focus,
:not(tr):focus,
:not(thead):focus,
:not(tfoot):focus,
:not(table):focus,
:not(div):focus,
:not(li):focus,
[role="button"]:focus,
[role="link"]:focus {
outline: 0.125rem solid #f90;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment