utils.less 846 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .textOverflow() {
  2. overflow: hidden;
  3. white-space: nowrap;
  4. text-overflow: ellipsis;
  5. word-break: break-all;
  6. }
  7. .textOverflowMulti(@line: 3, @bg: #fff) {
  8. position: relative;
  9. max-height: @line * 1.5em;
  10. margin-right: -1em;
  11. padding-right: 1em;
  12. overflow: hidden;
  13. line-height: 1.5em;
  14. text-align: justify;
  15. &::before {
  16. position: absolute;
  17. right: 14px;
  18. bottom: 0;
  19. padding: 0 1px;
  20. background: @bg;
  21. content: '...';
  22. }
  23. &::after {
  24. position: absolute;
  25. right: 14px;
  26. width: 1em;
  27. height: 1em;
  28. margin-top: 0.2em;
  29. background: white;
  30. content: '';
  31. }
  32. }
  33. // mixins for clearfix
  34. // ------------------------
  35. .clearfix() {
  36. zoom: 1;
  37. &::before,
  38. &::after {
  39. display: table;
  40. content: ' ';
  41. }
  42. &::after {
  43. clear: both;
  44. height: 0;
  45. font-size: 0;
  46. visibility: hidden;
  47. }
  48. }