Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. /// Provides an easy way to change the `word-wrap` property.
  2. ///
  3. /// @argument {string} $wrap [break-word]
  4. /// Value for the `word-break` property.
  5. ///
  6. /// @example scss
  7. /// .wrapper {
  8. /// @include word-wrap(break-word);
  9. /// }
  10. ///
  11. /// // CSS Output
  12. /// .wrapper {
  13. /// overflow-wrap: break-word;
  14. /// word-break: break-all;
  15. /// word-wrap: break-word;
  16. /// }
  17.  
  18. @mixin word-wrap($wrap: break-word) {
  19. overflow-wrap: $wrap;
  20. word-wrap: $wrap;
  21.  
  22. @if $wrap == break-word {
  23. word-break: break-all;
  24. } @else {
  25. word-break: $wrap;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement