_messages.scss 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. #conversejs {
  2. .message {
  3. .mention {
  4. font-weight: bold;
  5. }
  6. .mention--self {
  7. font-weight: normal;
  8. }
  9. &.date-separator {
  10. height: 2em;
  11. margin: 0;
  12. position: relative;
  13. text-align: center;
  14. z-index: 0;
  15. .separator {
  16. border: 0.5px solid var(--chat-head-color);
  17. margin: 0 1em;
  18. position: relative;
  19. top: 1em;
  20. z-index: 5;
  21. }
  22. .separator-text {
  23. background: white;
  24. bottom: 1px; // Offset needed due to .separator border size
  25. color: var(--message-text-color);
  26. display: inline-block;
  27. line-height: 2em;
  28. padding: 0 1em;
  29. position: relative;
  30. z-index: 5;
  31. }
  32. }
  33. &.chat-info {
  34. color: var(--chat-head-color);
  35. font-size: var(--message-font-size);
  36. line-height: var(--line-height-small);
  37. font-size: 90%;
  38. padding: 0.17rem 1rem;
  39. &.badge {
  40. color: var(--chat-head-text-color);
  41. }
  42. &.chat-state-notification {
  43. font-style: italic;
  44. }
  45. &.chat-event {
  46. clear: left;
  47. font-style: italic;
  48. }
  49. &.chat-error {
  50. color: var(--warning-color);
  51. font-weight: bold;
  52. }
  53. }
  54. .chat-image {
  55. height: auto;
  56. width: auto;
  57. max-height: 15em;
  58. max-width: 100%;
  59. }
  60. &.chat-msg--action {
  61. font-style: italic;
  62. }
  63. &.chat-msg {
  64. display: flex;
  65. flex-direction: row;
  66. overflow: auto; // Ensures that content stays inside
  67. padding: 0.25rem 1rem;
  68. &.onload {
  69. animation: colorchange-chatmessage 1s;
  70. -webkit-animation: colorchange-chatmessage 1s;
  71. }
  72. &:hover {
  73. background-color: rgba(0, 0, 0, 0.035);
  74. .chat-msg__actions {
  75. .chat-msg__action {
  76. opacity: 1;
  77. }
  78. }
  79. }
  80. &.correcting {
  81. &.groupchat {
  82. background-color: var(--chatroom-head-color-lighten-30-percent);
  83. }
  84. &:not(.groupchat) {
  85. background-color: var(--chat-head-color-lighten-50-percent);
  86. }
  87. }
  88. .spoiler {
  89. margin-top: 0.5em;
  90. }
  91. .spoiler-hint {
  92. margin-bottom: 0.5em;
  93. }
  94. .spoiler-toggle {
  95. color: white;
  96. i {
  97. color: white;
  98. padding-right: 0.5em;
  99. }
  100. &:before {
  101. padding-right: 0.25em;
  102. whitespace: nowrap;
  103. }
  104. }
  105. .chat-msg__content {
  106. display: flex;
  107. flex-direction: column;
  108. justify-content: space-between;
  109. align-items: stretch;
  110. margin-left: 0.5rem;
  111. width: 100%;
  112. }
  113. .chat-msg__content--action {
  114. margin-left: 0;
  115. }
  116. .chat-msg__body {
  117. display: flex;
  118. flex-direction: row;
  119. justify-content: space-between;
  120. width: 100%;
  121. }
  122. .chat-msg__message {
  123. display: flex;
  124. flex-direction: column;
  125. width: 100%;
  126. }
  127. .chat-msg__edit-modal {
  128. cursor: pointer;
  129. padding-right: 0.5em;
  130. }
  131. &.headline {
  132. .chat-msg__body {
  133. margin-left: 0;
  134. }
  135. }
  136. .chat-msg__text {
  137. padding: 0;
  138. color: var(--message-text-color);
  139. width: 100%;
  140. white-space: pre-wrap;
  141. a {
  142. word-wrap: break-word;
  143. word-break: break-all;
  144. display: inline-block;
  145. }
  146. img {
  147. &.emoji {
  148. height: 1.5em;
  149. width: 1.5em;
  150. margin: 0 .05em 0 .1em;
  151. vertical-align: -0.1em;
  152. }
  153. }
  154. .emojione {
  155. margin-bottom: -6px;
  156. }
  157. }
  158. .chat-msg__media {
  159. margin-top: 0.25rem;
  160. word-break: break-all;
  161. a {
  162. word-wrap: break-word;
  163. }
  164. audio {
  165. width: 100%;
  166. }
  167. }
  168. .chat-msg__actions {
  169. .chat-msg__action {
  170. height: var(--message-font-size);
  171. font-size: var(--message-font-size);
  172. padding: 0;
  173. border: none;
  174. opacity: 0;
  175. background: transparent;
  176. cursor: pointer;
  177. &:focus {
  178. display: block;
  179. }
  180. }
  181. }
  182. .chat-msg__avatar {
  183. margin-top: 0.5em;
  184. height: 36px;
  185. vertical-align: middle;
  186. width: 36px;
  187. }
  188. .chat-msg__heading {
  189. width: 100%;
  190. margin-top: 0.5em;
  191. padding-right: 0.25rem;
  192. padding-bottom: 0.25rem;
  193. display: block;
  194. .chat-msg__author {
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. white-space: nowrap;
  198. font-family: var(--heading-font);
  199. font-size: 115%;
  200. .badge {
  201. font-size: 80%;
  202. font-family: var(--normal_font);
  203. }
  204. }
  205. .chat-msg__time {
  206. padding-left: 0.25em;
  207. color: var(--text-color-lighten-15-percent);
  208. }
  209. }
  210. &.chat-msg--action {
  211. .chat-msg__content {
  212. flex-wrap: wrap;
  213. flex-direction: row;
  214. justify-content: flex-start;
  215. }
  216. .chat-msg__text {
  217. width: auto;
  218. }
  219. .chat-msg__heading {
  220. margin-top: 0;
  221. padding-bottom: 0;
  222. width: auto;
  223. }
  224. .chat-msg__author {
  225. font-size: var(--message-font-size);
  226. }
  227. .chat-msg__time {
  228. margin-left: 0;
  229. }
  230. }
  231. &.chat-msg--followup {
  232. .chat-msg__heading,
  233. .chat-msg__avatar {
  234. display: none;
  235. }
  236. .chat-msg__content {
  237. margin-left: 2.75rem;
  238. }
  239. }
  240. }
  241. }
  242. .chatroom-body .message {
  243. &.onload {
  244. animation: colorchange-chatmessage-muc 1s;
  245. -webkit-animation: colorchange-chatmessage-muc 1s;
  246. }
  247. .separator {
  248. border: 0.5px solid var(--chatroom-head-color);
  249. }
  250. }
  251. }
  252. #conversejs.converse-overlayed {
  253. .message {
  254. &.chat-msg {
  255. &.chat-msg--followup {
  256. .chat-msg__content {
  257. margin-left: 0;
  258. }
  259. }
  260. }
  261. }
  262. }
  263. @media screen and (max-width: 767px) {
  264. #conversejs:not(.converse-embedded) {
  265. .message {
  266. &.chat-msg {
  267. .chat-msg__author {
  268. white-space: normal;
  269. }
  270. }
  271. }
  272. }
  273. }