chat.less 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. }
  11. .first-message {
  12. position: absolute;
  13. bottom: 0;
  14. width: 100%;
  15. padding: @line-height-computed / 2;
  16. }
  17. .messages {
  18. position: absolute;
  19. top: 0;
  20. left: 0;
  21. right: 0;
  22. bottom: @new-message-height;
  23. overflow-x: hidden;
  24. li.message {
  25. margin: @line-height-computed / 2;
  26. .date {
  27. font-size: 12px;
  28. color: @gray-light;
  29. border-bottom: 1px solid @gray-lightest;
  30. margin-bottom: @line-height-computed / 2;
  31. text-align: center;
  32. }
  33. .avatar {
  34. margin-top: 14px;
  35. float: left;
  36. width: 50px;
  37. height: 50px;
  38. border-radius: 50%;
  39. overflow: hidden;
  40. img {
  41. width: 100%;
  42. }
  43. }
  44. .message-wrapper {
  45. margin-left: 50px + @line-height-computed/2;
  46. .name {
  47. font-size: 12px;
  48. color: @gray-light;
  49. margin-bottom: 4px;
  50. min-height: 16px;
  51. }
  52. .message {
  53. padding: @line-height-computed / 2;
  54. border-left: 3px solid transparent;
  55. position: relative;
  56. font-size: 14px;
  57. box-shadow: -1px 2px 3px #ddd;
  58. border-raduis: @border-radius-base;
  59. .arrow {
  60. right: 100%;
  61. top: @line-height-computed / 4;
  62. border: solid;
  63. content: " ";
  64. height: 0;
  65. width: 0;
  66. position: absolute;
  67. pointer-events: none;
  68. border-top-color: transparent !important;
  69. border-bottom-color: transparent !important;
  70. border-width: 10px;
  71. }
  72. }
  73. p {
  74. margin-bottom: @line-height-computed / 4;
  75. &:last-child {
  76. margin-bottom: 0;
  77. }
  78. }
  79. }
  80. &:not(.self) {
  81. .message {
  82. .arrow {
  83. border-left-color: transparent !important;
  84. }
  85. }
  86. }
  87. &.self {
  88. margin-top: @line-height-computed;
  89. .avatar {
  90. display: none;
  91. }
  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: @gray-lightest;
  109. padding: @line-height-computed / 4;
  110. border-top: 1px solid @toolbar-border-color;
  111. textarea {
  112. overflow: auto;
  113. resize: none;
  114. border-radius: @border-radius-base;
  115. border: 1px solid @toolbar-border-color;
  116. height: 100%;
  117. width: 100%;
  118. color: @gray-dark;
  119. font-size: 14px;
  120. padding: @line-height-computed / 4;
  121. }
  122. }
  123. }
  124. .editor-dark {
  125. .chat {
  126. .new-message {
  127. background-color: lighten(@editor-dark-background-color, 10%);
  128. border-color: @editor-dark-toolbar-border-color;
  129. }
  130. }
  131. }