Created
September 4, 2020 06:37
-
-
Save joellesenne/f7a44d638143e568879a18247b088b35 to your computer and use it in GitHub Desktop.
SCSS ellipsis mixin
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
/* SCSS ellipsis mixin <https://codepad.co/snippet/scss-ellipsis-mixin> */ | |
@mixin ellipsis($width: 100%) { | |
display: inline-block; | |
max-width: $width; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
/* How to use | |
div { | |
@include ellipsis; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment