You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vizality/renderer/src/styles/utils/mixins/_ellipsis.scss

26 lines
630 B

/**
* Truncates text and adds an ellipsis to represent overflow.
* @param {number} [$max-width=100%] Max width for the string to respect before being truncated
* @param {string} [$display=inline-block] Display property of the element
* @example
* // SCSS
* .element {
* @include ellipsis;
* }
* // CSS
* .element {
* overflow: hidden;
* text-overflow: ellipsis;
* white-space: nowrap;
* word-wrap: normal;
* }
*/
@mixin ellipsis($max-width: null, $display: null) {
display: $display;
max-width: $max-width;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: normal;
white-space: nowrap;
}