chat.less 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. @new-message-height: 80px;
  2. .chat {
  3. .loading {
  4. font-family: @font-family-serif;
  5. padding: @line-height-computed / 2;
  6. text-align: center;
  7. }
  8. .no-messages {
  9. padding: @line-height-computed / 2;
  10. }
  11. .first-message {
  12. position: absolute;
  13. bottom: 0;
  14. width: 100%;
  15. padding: @line-height-computed / 2;
  16. }
  17. .messages {
  18. position: absolute;
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. bottom: @new-message-height;
  23. overflow-x: hidden;
  24. li.message {
  25. margin: @line-height-computed / 2;
  26. .date {
  27. font-size: 12px;
  28. color: @gray-light;
  29. border-bottom: 1px solid @gray-lightest;
  30. margin-bottom: @line-height-computed / 2;
  31. text-align: center;
  32. }
  33. .avatar {
  34. margin-top: 14px;
  35. float: left;
  36. width: 50px;
  37. height: 50px;
  38. border-radius: 50%;
  39. overflow: hidden;
  40. img {
  41. width: 100%;
  42. }
  43. }
  44. .message-wrapper {
  45. margin-left: 50px + @line-height-computed/2;
  46. .name {
  47. font-size: 12px;
  48. color: @gray-light;
  49. margin-bottom: 4px;
  50. min-height: 16px;
  51. }
  52. .message {
  53. border-left: 3px solid transparent;
  54. font-size: 14px;
  55. box-shadow: -1px 2px 3px #ddd;
  56. border-raduis: @border-radius-base;
  57. position: relative;
  58. .message-content {
  59. padding: @line-height-computed / 2;
  60. overflow-x: auto;
  61. }
  62. .arrow {
  63. right: 100%;
  64. top: @line-height-computed / 4;
  65. border: solid;
  66. content: " ";
  67. height: 0;
  68. width: 0;
  69. position: absolute;
  70. pointer-events: none;
  71. border-top-color: transparent !important;
  72. border-bottom-color: transparent !important;
  73. border-width: 10px;
  74. }
  75. }
  76. p {
  77. margin-bottom: @line-height-computed / 4;
  78. &:last-child {
  79. margin-bottom: 0;
  80. }
  81. }
  82. }
  83. &:not(.self) {
  84. .message {
  85. .arrow {
  86. border-left-color: transparent !important;
  87. }
  88. }
  89. }
  90. &.self {
  91. margin-top: @line-height-computed;
  92. .avatar {
  93. display: none;
  94. }
  95. .message-wrapper .message {
  96. border-left: none;
  97. border-right: 3px solid transparent;
  98. .arrow {
  99. left: 100%;
  100. right: auto;
  101. border-right-color: transparent !important;
  102. }
  103. }
  104. }
  105. }
  106. }
  107. .new-message {
  108. .full-size;
  109. top: auto;
  110. height: @new-message-height;
  111. background-color: @gray-lightest;
  112. padding: @line-height-computed / 4;
  113. border-top: 1px solid @toolbar-border-color;
  114. textarea {
  115. overflow: auto;
  116. resize: none;
  117. border-radius: @border-radius-base;
  118. border: 1px solid @toolbar-border-color;
  119. height: 100%;
  120. width: 100%;
  121. color: @gray-dark;
  122. font-size: 14px;
  123. padding: @line-height-computed / 4;
  124. }
  125. }
  126. }
  127. .break-word {
  128. word-break: break-all;
  129. }
  130. .editor-dark {
  131. .chat {
  132. .new-message {
  133. background-color: lighten(@editor-dark-background-color, 10%);
  134. border-color: @editor-dark-toolbar-border-color;
  135. }
  136. }
  137. }