Created
August 7, 2017 11:01
-
-
Save andreasvirkus/0a648187f222075d6197df02e2be3f79 to your computer and use it in GitHub Desktop.
The proper way to get rid of outline styles _aesthetically_, whilst keeping them for accessibility purposes!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="/favicon.ico"> | |
<style id="_outline-styles"> | |
/* Outline styles will be injected here */ | |
</style> | |
</head> | |
<body onmousedown="document.getElementById('_outline-styles').innerHTML='a,a:active,a:focus{outline:none}';" | |
onkeydown="document.getElementById('_outline-styles').innerHTML='';"> | |
<noscript> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment