Created
March 31, 2014 15:21
-
-
Save hotmeteor/9894793 to your computer and use it in GitHub Desktop.
Text replacer for smaller screens.
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
@media only screen and (max-width: 599px) { | |
[data-replace] { | |
display: inline-block; | |
overflow: hidden; | |
letter-spacing: -999em; | |
vertical-align: bottom; | |
&::before { | |
content: attr(data-replace); | |
letter-spacing: 0; | |
} | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0"> | |
<link rel="stylesheet" href="data-replace.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<p>I like S<span data-replace=".">yntactically</span> A<span data-replace=".">wesome</span> S<span data-replace=".">tyle</span> S<span data-replace=".">heets</span>.</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment