chat.less 3.7 KB

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