X-Git-Url: https://git.danix.xyz/?a=blobdiff_plain;f=assets%2Fsass%2Fbourbon%2Fbourbon%2Flibrary%2F_ellipsis.scss;fp=assets%2Fsass%2Fbourbon%2Fbourbon%2Flibrary%2F_ellipsis.scss;h=6d3e5c63d57ca63f6e5a95a2a7b62fb2c04ae1cb;hb=2d3ca553a3d3345ec8ecdf0faedc6924cd0e2f5d;hp=0000000000000000000000000000000000000000;hpb=2ae9d02fd007f6d0bab6576f8f26d66570358605;p=theme-danix.xyz.git diff --git a/assets/sass/bourbon/bourbon/library/_ellipsis.scss b/assets/sass/bourbon/bourbon/library/_ellipsis.scss new file mode 100644 index 0000000..6d3e5c6 --- /dev/null +++ b/assets/sass/bourbon/bourbon/library/_ellipsis.scss @@ -0,0 +1,36 @@ +@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; +}