chat.less 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. }
  51. .message {
  52. padding: @line-height-computed / 2;
  53. border-left: 3px solid transparent;
  54. position: relative;
  55. font-size: 14px;
  56. box-shadow: -1px 2px 3px #ddd;
  57. border-raduis: @border-radius-base;
  58. .arrow {
  59. right: 100%;
  60. top: @line-height-computed / 4;
  61. border: solid;
  62. content: " ";
  63. height: 0;
  64. width: 0;
  65. position: absolute;
  66. pointer-events: none;
  67. border-top-color: transparent !important;
  68. border-bottom-color: transparent !important;
  69. border-width: 10px;
  70. }
  71. }
  72. p {
  73. margin-bottom: @line-height-computed / 4;
  74. &:last-child {
  75. margin-bottom: 0;
  76. }
  77. }
  78. }
  79. &:not(.self) {
  80. .message {
  81. .arrow {
  82. border-left-color: transparent !important;
  83. }
  84. }
  85. }
  86. &.self {
  87. margin-top: @line-height-computed;
  88. .avatar {
  89. display: none;
  90. }
  91. .message-wrapper .message {
  92. border-left: none;
  93. border-right: 3px solid transparent;
  94. .arrow {
  95. left: 100%;
  96. right: auto;
  97. border-right-color: transparent !important;
  98. }
  99. }
  100. }
  101. }
  102. }
  103. .new-message {
  104. .full-size;
  105. top: auto;
  106. height: @new-message-height;
  107. background-color: @gray-lightest;
  108. padding: @line-height-computed / 4;
  109. border-top: 1px solid @toolbar-border-color;
  110. textarea {
  111. overflow: auto;
  112. resize: none;
  113. border-radius: @border-radius-base;
  114. border: 1px solid @toolbar-border-color;
  115. height: 100%;
  116. width: 100%;
  117. color: @gray-dark;
  118. font-size: 14px;
  119. padding: @line-height-computed / 4;
  120. }
  121. }
  122. }
  123. .editor-dark {
  124. .chat {
  125. .new-message {
  126. background-color: lighten(@editor-dark-background-color, 10%);
  127. border-color: @editor-dark-toolbar-border-color;
  128. }
  129. }
  130. }