2
0

_messages.scss 8.3 KB

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