Created
October 12, 2011 02:44
-
-
Save sousk/1280108 to your computer and use it in GitHub Desktop.
Visually Hidden
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
.element-invisible { | |
position: absolute !important; | |
height: 1px; width: 1px; | |
overflow: hidden; | |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ | |
clip: rect(1px, 1px, 1px, 1px); | |
} | |
/* Hide only visually, but have it available for screenreaders: h5bp.com/v */ | |
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } | |
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */ | |
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment