Last active
November 12, 2019 09:32
-
-
Save zandroid/2b4d8f2b2aef4aba7c80 to your computer and use it in GitHub Desktop.
Revisions
-
Andrey Zaytsev revised this gist
Aug 4, 2015 . No changes.There are no files selected for viewing
-
Andrey Zaytsev revised this gist
Aug 4, 2015 . No changes.There are no files selected for viewing
-
Andrey Zaytsev created this gist
Aug 4, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,46 @@ @mixin multiline-ellipsis( $lines, $lineHeight: 1.4, $ellipsisWidth: 3em, $bgColor: white ) { box-sizing: content-box; overflow: hidden; height: $lines * $lineHeight * 1em; line-height: $lineHeight; &:before { content:""; float: left; width: 5px; height: $lines * $lineHeight * 1em; } & > *:first-child { float: right; width: 100%; margin-left: -5px; } &:after { content: "\02026"; float: right; position: relative; top: -$lineHeight * 1em; left: 100%; box-sizing: content-box !important; width: $ellipsisWidth; margin-left: -$ellipsisWidth; padding-right: 5px; text-align: right; background: white; background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to($bgColor), color-stop(50%, $bgColor)); background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), $bgColor 50%, $bgColor); background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), $bgColor 50%, $bgColor); background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), $bgColor 50%, $bgColor); background: linear-gradient(to right, rgba(255, 255, 255, 0), $bgColor 50%, $bgColor) } } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ .box-2lines-ellipsis { @include multiline-ellipsis(2); }