chat.less 3.2 KB

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