_word-wrap.scss (597B)
1 @charset "UTF-8"; 2 3 /// Provides an easy way to change the `word-wrap` property. 4 /// 5 /// @param {String} $wrap [break-word] 6 /// Value for the `word-break` property. 7 /// 8 /// @example scss - Usage 9 /// .wrapper { 10 /// @include word-wrap(break-word); 11 /// } 12 /// 13 /// @example css - CSS Output 14 /// .wrapper { 15 /// overflow-wrap: break-word; 16 /// word-break: break-all; 17 /// word-wrap: break-word; 18 /// } 19 20 @mixin word-wrap($wrap: break-word) { 21 overflow-wrap: $wrap; 22 word-wrap: $wrap; 23 24 @if $wrap == break-word { 25 word-break: break-all; 26 } @else { 27 word-break: $wrap; 28 } 29 }