Created
November 7, 2012 16:20
-
-
Save daneden/4032573 to your computer and use it in GitHub Desktop.
Sass media queries and @extend
This file contains 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
// Fairly safe way to visually hide content, but make it accessible to screen readers | |
.visually-hidden { | |
position: absolute; | |
left: -9999px; | |
height: 1px; | |
} | |
@media screen and (max-width: 700px) { | |
// Again, accessible to screen readers | |
// Example: <a href="/login" class="icon icon-twitter"><span class="mobile-offscreen">Single-click </span> log in with Twitter</a> | |
.mobile-offscreen { | |
@extend .visually-hidden; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment