Mercurial > nebulaweb3
diff default/assets/scss/vendors/bourbon/library/_ellipsis.scss @ 0:1d038bc9b3d2 default tip
Up:default
author | Liny <dev@neowd.com> |
---|---|
date | Sat, 31 May 2025 09:21:51 +0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default/assets/scss/vendors/bourbon/library/_ellipsis.scss Sat May 31 09:21:51 2025 +0800 @@ -0,0 +1,37 @@ +@charset "UTF-8"; + +/// Truncates text and adds an ellipsis to represent overflow. +/// +/// @argument {number} $width [100%] +/// The `max-width` for the string to respect before being truncated. +/// +/// @argument {string} $display [inline-block] +/// Sets the display-value of the element. +/// +/// @example scss +/// .element { +/// @include ellipsis; +/// } +/// +/// // CSS Output +/// .element { +/// display: inline-block; +/// max-width: 100%; +/// overflow: hidden; +/// text-overflow: ellipsis; +/// white-space: nowrap; +/// word-wrap: normal; +/// } + +@mixin ellipsis( + $width: 100%, + $display: inline-block + ) { + + display: $display; + max-width: $width; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + word-wrap: normal; +}