chat.less 2.9 KB

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