Skip to content

Instantly share code, notes, and snippets.

@terkel
Last active December 23, 2015 15:19
Show Gist options
  • Select an option

  • Save terkel/6654732 to your computer and use it in GitHub Desktop.

Select an option

Save terkel/6654732 to your computer and use it in GitHub Desktop.
/*
* http://adaptivethemes.com/using-css-clip-as-an-accessible-method-of-hiding-content
* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
* http://developer.yahoo.com/blogs/ydn/clip-hidden-content-better-accessibility-53456.html
* https://github.com/h5bp/html5-boilerplate/issues/194
*/
/* Hide from both screenreaders and browsers */
.hidden {
display: none !important;
visibility: hidden;
}
/* Hide only visually, but have it available for screenreaders */
.hidden-visually {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment