Skip to content

Instantly share code, notes, and snippets.

@guyroutledge
Created October 18, 2013 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guyroutledge/7041797 to your computer and use it in GitHub Desktop.
Save guyroutledge/7041797 to your computer and use it in GitHub Desktop.
A mixin for doing text-indent image replacement
%screen-reader-text {
text-align:left;
text-indent:-9999px;
}
@mixin background-image-dimensions($image) {
width:image-width($image);
height:image-height($image);
background-image:url($image);
}
@mixin image-replacement($image) {
@include background-image-dimensions($image);
@extend %screen-reader-text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment