Created
May 24, 2013 08:59
-
-
Save ZeeDev/5642250 to your computer and use it in GitHub Desktop.
ellipsis.scss
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 ellipsis( | |
$height: 1em, | |
$width: 2.5em, | |
$line-height: 1em, | |
$padding-right: 5px | |
) { | |
&:before { | |
content: ''; | |
float: left; | |
width: 5px; | |
height: $height; | |
} | |
&:after { | |
content: "\02026"; | |
@include box-sizing(content-box); | |
float: right; | |
position: relative; | |
top: -$line-height; | |
left: 100%; | |
width: $width; | |
margin-left: -$width; | |
padding-right: $padding-right; | |
text-align: right; | |
// @include background-size(100% 100%); | |
background: white; | |
@include background(linear-gradient(left, rgba(white, 0), rgba(white, 1) 20%, rgba(white, 1) 100%)); | |
@content; | |
} | |
& > *:first-child { | |
float: right; | |
width: 100%; | |
margin-left: -5px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment