Created
January 30, 2014 19:34
-
-
Save mrilikecoding/8717007 to your computer and use it in GitHub Desktop.
converts any text into a single line with a fade out on the right side
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
@mixin text-overflow-fade($background-color: #fff, $text-width: 100%, $fade-size: 30%) { | |
width: $text-width; | |
overflow: hidden; | |
white-space: nowrap; | |
position: relative; | |
&:after { | |
content: ''; | |
position: absolute; | |
top: 0; | |
right: 0; | |
width: $fade-size; | |
height: 100%; | |
@include background-image(linear-gradient(left, rgba(255,255,255,0) 0%, $background-color 80%, $background-color 100%)); | |
pointer-events: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment