chat.less 3.3 KB

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