chat.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. .message-wrapper {
  43. .name {
  44. font-size: 12px;
  45. color: @chat-message-name-color;
  46. margin-bottom: 4px;
  47. min-height: 16px;
  48. }
  49. .message {
  50. border-left: 3px solid transparent;
  51. font-size: 14px;
  52. box-shadow: @chat-message-box-shadow;
  53. border-radius: @chat-message-border-radius;
  54. position: relative;
  55. .message-content {
  56. padding: @chat-message-padding;
  57. overflow-x: auto;
  58. color: @chat-message-color;
  59. font-weight: @chat-message-weight;
  60. }
  61. .arrow {
  62. transform: rotate(90deg);
  63. right: 90%;
  64. top: -15px;
  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. .message-wrapper .message {
  93. border-left: none;
  94. border-right: 3px solid transparent;
  95. .arrow {
  96. left: 100%;
  97. right: auto;
  98. border-right-color: transparent !important;
  99. }
  100. }
  101. }
  102. }
  103. }
  104. .new-message {
  105. .full-size;
  106. top: auto;
  107. height: @new-message-height;
  108. background-color: @chat-new-message-bg;
  109. padding: @line-height-computed / 4;
  110. border-top: 1px solid @chat-new-message-border-color;
  111. textarea {
  112. overflow: auto;
  113. resize: none;
  114. border-radius: @border-radius-base;
  115. border: 1px solid @chat-new-message-border-color;
  116. height: 100%;
  117. width: 100%;
  118. color: @chat-new-message-textarea-color;
  119. font-size: 14px;
  120. padding: @line-height-computed / 4;
  121. background-color: @chat-new-message-textarea-bg;
  122. }
  123. }
  124. }
  125. .break-word {
  126. word-break: break-all;
  127. }
  128. .editor-dark when (@is-overleaf = false) {
  129. .chat {
  130. .new-message {
  131. background-color: lighten(@editor-dark-background-color, 10%);
  132. border-color: @editor-dark-toolbar-border-color;
  133. }
  134. }
  135. }