_messages.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. #conversejs {
  2. .message {
  3. &.date-separator {
  4. height: 2em;
  5. margin: 0;
  6. position: relative;
  7. text-align: center;
  8. z-index: 0;
  9. .separator {
  10. border: 0.5px solid $chat-head-color;
  11. margin: 0 1em;
  12. position: relative;
  13. top: 1em;
  14. z-index: 5;
  15. }
  16. .separator-text {
  17. background: white;
  18. bottom: 1px; // Offset needed due to .separator border size
  19. color: $message-text-color;
  20. display: inline-block;
  21. line-height: 2em;
  22. padding: 0 1em;
  23. position: relative;
  24. z-index: 5;
  25. }
  26. }
  27. &.chat-info {
  28. color: $chat-head-color;
  29. font-size: $message-font-size;
  30. line-height: $line-height-small;
  31. padding: 0.35rem 1rem;
  32. &.badge {
  33. color: $chat-head-text-color;
  34. }
  35. &.chat-state-notification {
  36. font-style: italic;
  37. }
  38. &.chat-event {
  39. clear: left;
  40. font-style: italic;
  41. }
  42. &.chat-error {
  43. color: $warning-color;
  44. font-weight: bold;
  45. }
  46. }
  47. .chat-image {
  48. height: auto;
  49. width: auto;
  50. max-height: 15em;
  51. max-width: 100%;
  52. }
  53. &.chat-action {
  54. font-style: italic;
  55. }
  56. &.chat-msg {
  57. display: flex;
  58. flex-direction: row;
  59. overflow: auto; // Ensures that content stays inside
  60. padding: 0.5rem 1rem;
  61. &.onload {
  62. animation: colorchange-chatmessage 1s;
  63. -webkit-animation: colorchange-chatmessage 1s;
  64. }
  65. &:hover {
  66. background-color: rgba(0, 0, 0, 0.035);
  67. }
  68. .spoiler {
  69. margin-top: 0.5em;
  70. }
  71. .spoiler-hint {
  72. margin-bottom: 0.5em;
  73. }
  74. .spoiler-toggle {
  75. color: white;
  76. i {
  77. color: white;
  78. padding-right: 0.5em;
  79. }
  80. &:before {
  81. padding-right: 0.25em;
  82. whitespace: nowrap;
  83. }
  84. }
  85. .chat-msg-content {
  86. margin-left: 0.5rem;
  87. width: 100%;
  88. }
  89. &.headline {
  90. .chat-msg-content {
  91. margin-left: 0;
  92. }
  93. }
  94. .chat-msg-text {
  95. padding: 0;
  96. color: $message-text-color;
  97. a {
  98. word-wrap: break-word;
  99. word-break: break-all;
  100. }
  101. .emojione {
  102. margin-bottom: -6px;
  103. }
  104. }
  105. .chat-msg-media {
  106. margin-top: 0.25rem;
  107. a {
  108. word-wrap: break-word;
  109. }
  110. audio {
  111. width: 100%;
  112. }
  113. }
  114. .avatar {
  115. margin-top: 0.5em;
  116. background: $gray-color;
  117. height: 36px;
  118. vertical-align: middle;
  119. width: 36px;
  120. }
  121. .chat-msg-heading {
  122. margin-top: 0.5em;
  123. padding-right: 0.25rem;
  124. padding-bottom: 0.25rem;
  125. display: block;
  126. .chat-msg-author {
  127. font-weight: bold;
  128. }
  129. .chat-msg-time {
  130. padding-left: 0.25em;
  131. color: lighten($text-color, 15%);
  132. }
  133. }
  134. &.chat-action {
  135. .chat-msg-heading {
  136. margin-top: 0;
  137. }
  138. }
  139. &.chat-msg-followup {
  140. padding: 0.25rem 1rem;
  141. .chat-msg-heading,
  142. .avatar {
  143. display: none;
  144. }
  145. .chat-msg-content {
  146. margin-left: 2.75rem;
  147. }
  148. }
  149. }
  150. }
  151. .chatroom-body .message {
  152. &.onload {
  153. animation: colorchange-chatmessage-muc 1s;
  154. -webkit-animation: colorchange-chatmessage-muc 1s;
  155. }
  156. .separator {
  157. border: 0.5px solid $chatroom-head-color;
  158. }
  159. }
  160. }
  161. #conversejs.converse-overlayed {
  162. .message {
  163. &.chat-msg {
  164. &.chat-msg-followup {
  165. .chat-msg-content {
  166. margin-left: 0;
  167. }
  168. }
  169. }
  170. }
  171. }
  172. @media screen and (max-width: 767px) {
  173. #conversejs:not(.converse-embedded) {
  174. .message {
  175. &.chat-msg {
  176. .chat-msg-author {
  177. white-space: normal;
  178. }
  179. }
  180. }
  181. }
  182. }