Skip to content

Instantly share code, notes, and snippets.

@being-frank
Last active December 10, 2015 09:29
Show Gist options
  • Save being-frank/4414351 to your computer and use it in GitHub Desktop.
Save being-frank/4414351 to your computer and use it in GitHub Desktop.
A re-usable SCSS mixin that replaces the original -9999px image replacement hack.
@mixin hide-text {
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
}
body h1:first-child {
@include hide-text;
background: url('https://www.google.com/images/srpr/logo3w.png') no-repeat 50% top;
height: 95px;
width: 275px;
}
.hide-text {
@include hide-text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment