_messages.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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.25rem 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. height: 36px;
  117. vertical-align: middle;
  118. width: 36px;
  119. }
  120. .chat-msg-heading {
  121. margin-top: 0.5em;
  122. padding-right: 0.25rem;
  123. padding-bottom: 0.25rem;
  124. display: block;
  125. .chat-msg-author {
  126. font-family: $heading-font;
  127. font-size: 115%;
  128. .badge {
  129. font-size: 80%;
  130. font-family: $normal_font;
  131. }
  132. }
  133. .chat-msg-time {
  134. padding-left: 0.25em;
  135. color: lighten($text-color, 15%);
  136. }
  137. }
  138. &.chat-action {
  139. display: block;
  140. .chat-msg-heading {
  141. float: left;
  142. margin-top: 0;
  143. padding-bottom: 0;
  144. }
  145. }
  146. &.chat-msg-followup {
  147. .chat-msg-heading,
  148. .avatar {
  149. display: none;
  150. }
  151. .chat-msg-content {
  152. margin-left: 2.75rem;
  153. }
  154. }
  155. }
  156. }
  157. .chatroom-body .message {
  158. &.onload {
  159. animation: colorchange-chatmessage-muc 1s;
  160. -webkit-animation: colorchange-chatmessage-muc 1s;
  161. }
  162. .separator {
  163. border: 0.5px solid $chatroom-head-color;
  164. }
  165. }
  166. }
  167. #conversejs.converse-overlayed {
  168. .message {
  169. &.chat-msg {
  170. &.chat-msg-followup {
  171. .chat-msg-content {
  172. margin-left: 0;
  173. }
  174. }
  175. }
  176. }
  177. }
  178. @media screen and (max-width: 767px) {
  179. #conversejs:not(.converse-embedded) {
  180. .message {
  181. &.chat-msg {
  182. .chat-msg-author {
  183. white-space: normal;
  184. }
  185. }
  186. }
  187. }
  188. }