_messages.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. #conversejs {
  2. .older-msg {
  3. time {
  4. font-weight: bold;
  5. }
  6. }
  7. .message {
  8. .mention {
  9. font-weight: bold;
  10. }
  11. .mention--self {
  12. font-weight: normal;
  13. }
  14. &.date-separator,
  15. &.separator {
  16. height: 2em;
  17. margin: 0;
  18. position: relative;
  19. text-align: center;
  20. z-index: 0;
  21. .separator {
  22. border-top: 0px;
  23. border-bottom: var(--chat-separator-border-bottom);
  24. margin: 0 1em;
  25. position: relative;
  26. top: 1em;
  27. z-index: 5;
  28. }
  29. .separator-text {
  30. background: white;
  31. bottom: 1px; // Offset needed due to .separator border size
  32. color: var(--separator-text-color);
  33. display: inline-block;
  34. line-height: 2em;
  35. padding: 0 1em;
  36. position: relative;
  37. z-index: 5;
  38. }
  39. }
  40. &.chat-msg--retracted {
  41. .chat-msg__message {
  42. color: var(--subdued-color);
  43. }
  44. }
  45. &.chat-info {
  46. color: var(--chat-head-color);
  47. font-size: var(--message-font-size);
  48. line-height: var(--line-height-small);
  49. font-size: 90%;
  50. padding: 0.17rem 1rem;
  51. &.badge {
  52. color: var(--chat-head-text-color);
  53. }
  54. &.chat-state-notification {
  55. font-style: italic;
  56. }
  57. &.chat-event {
  58. clear: left;
  59. font-style: italic;
  60. }
  61. &.chat-error {
  62. color: var(--error-color);
  63. font-weight: bold;
  64. }
  65. .q {
  66. font-style: italic;
  67. }
  68. }
  69. .chat-image {
  70. height: auto;
  71. width: auto;
  72. max-height: 15em;
  73. max-width: 100%;
  74. }
  75. &.chat-msg--action {
  76. font-style: italic;
  77. .chat-msg__author {
  78. padding-right: 0.2em;
  79. }
  80. }
  81. &.chat-msg {
  82. display: inline-flex;
  83. width: 100%;
  84. flex-direction: row;
  85. padding: 0.125rem 1rem;
  86. &.onload {
  87. animation: colorchange-chatmessage 1s;
  88. -webkit-animation: colorchange-chatmessage 1s;
  89. }
  90. &:hover {
  91. background-color: var(--list-item-hover-color);
  92. }
  93. &.correcting {
  94. &.groupchat {
  95. background-color: var(--chatroom-correcting-color);
  96. }
  97. &:not(.groupchat) {
  98. background-color: var(--chat-correcting-color);
  99. }
  100. }
  101. .spoiler {
  102. margin-top: 0.5em;
  103. }
  104. .spoiler-hint {
  105. margin-bottom: 0.5em;
  106. }
  107. .spoiler-toggle {
  108. color: white;
  109. i {
  110. color: white;
  111. padding-right: 0.5em;
  112. }
  113. &:before {
  114. padding-right: 0.25em;
  115. whitespace: nowrap;
  116. }
  117. }
  118. .chat-msg__content {
  119. display: flex;
  120. flex-direction: column;
  121. justify-content: space-between;
  122. align-items: stretch;
  123. margin-left: 0.5rem;
  124. width: calc(100% - var(--message-avatar-width));
  125. &:hover {
  126. .btn--standalone {
  127. opacity: 1;
  128. }
  129. }
  130. }
  131. .chat-msg__content--me {
  132. .chat-msg__body--groupchat {
  133. .chat-msg__text {
  134. color: var(--subdued-color);
  135. }
  136. &.chat-msg__body--delayed .chat-msg__text,
  137. &.chat-msg__body--received .chat-msg__text {
  138. color: var(--message-text-color);
  139. }
  140. }
  141. }
  142. .chat-msg__content--action {
  143. width: 100%;
  144. margin-left: 0;
  145. }
  146. .chat-msg__body {
  147. display: flex;
  148. flex-direction: row;
  149. justify-content: space-between;
  150. }
  151. converse-chat-message-body {
  152. display: inline;
  153. }
  154. .chat-msg__message {
  155. line-height: 1.5em;
  156. display: inline-flex;
  157. flex-direction: column;
  158. width: 100%;
  159. overflow-wrap: break-word;
  160. }
  161. .chat-msg__edit-modal {
  162. cursor: pointer;
  163. padding-right: 0.5em;
  164. }
  165. &.headline {
  166. .chat-msg__body {
  167. margin-left: 0;
  168. }
  169. }
  170. .chat-msg__subject {
  171. font-weight: bold;
  172. clear: right;
  173. }
  174. .chat-msg__text {
  175. color: var(--message-text-color);
  176. padding: 0;
  177. white-space: pre-wrap;
  178. word-wrap: break-word;
  179. word-break: break-word;
  180. a {
  181. word-wrap: break-word;
  182. word-break: break-all;
  183. display: inline;
  184. &.chat-image__link {
  185. width: fit-content;
  186. display: block;
  187. }
  188. }
  189. img {
  190. &.emoji {
  191. height: 1.5em;
  192. width: 1.5em;
  193. margin: 0 .05em 0 .1em;
  194. vertical-align: -0.1em;
  195. }
  196. }
  197. .emojione {
  198. margin-bottom: -6px;
  199. }
  200. }
  201. .chat-msg__text--larger {
  202. font-size: 1.6em;
  203. padding-top: 0.25em;
  204. padding-bottom: 0.25em;
  205. }
  206. .chat-msg__error {
  207. color: var(--error-color);
  208. }
  209. .chat-msg__media {
  210. margin-top: 0.25rem;
  211. word-break: break-all;
  212. a {
  213. word-wrap: break-word;
  214. }
  215. audio {
  216. width: 100%;
  217. }
  218. }
  219. converse-message-actions {
  220. margin-left: 0.5em;
  221. }
  222. .chat-msg__actions {
  223. .dropdown-menu {
  224. min-width: 5rem;
  225. }
  226. i {
  227. color: var(--text-color-lighten-15-percent);
  228. font-size: 70%;
  229. }
  230. button {
  231. border: none;
  232. background: transparent;
  233. color: var(--text-color-lighten-15-percent);
  234. padding: 0 0.25em;
  235. }
  236. .btn--standalone {
  237. opacity: 0;
  238. margin-top: -0.2em;
  239. }
  240. .chat-msg__action {
  241. width: 100%;
  242. padding: 0.5em 1em;
  243. text-align: left;
  244. white-space: nowrap;
  245. converse-icon {
  246. margin-right: 0.25em;
  247. }
  248. &:hover {
  249. color: var(--text-color);
  250. background-color: var(--list-item-hover-color);
  251. }
  252. }
  253. }
  254. .chat-msg__avatar {
  255. margin-top: 0.5em;
  256. vertical-align: middle;
  257. height: var(--message-avatar-height);
  258. width: var(--message-avatar-width);
  259. min-height: var(--message-avatar-height);
  260. min-width: var(--message-avatar-width);
  261. }
  262. .chat-msg__author {
  263. overflow: hidden;
  264. text-overflow: ellipsis;
  265. white-space: nowrap;
  266. font-family: var(--heading-font);
  267. font-size: 115%;
  268. font-weight: bold;
  269. padding-bottom: 1px; // Hack to avoid cutting of text on the button
  270. }
  271. .chat-msg__heading {
  272. width: 100%;
  273. margin-top: 0.5em;
  274. padding-right: 0.25rem;
  275. padding-bottom: 0.25rem;
  276. .badge {
  277. margin-left: 0.5em;
  278. font-family: var(--normal_font);
  279. }
  280. .chat-msg__time {
  281. padding-left: 0.25em;
  282. padding-right: 0.25em;
  283. color: var(--text-color-lighten-15-percent);
  284. }
  285. }
  286. &.chat-msg--action {
  287. .chat-msg__message {
  288. flex-direction: row;
  289. }
  290. .chat-msg__text {
  291. width: auto;
  292. }
  293. .chat-msg__heading {
  294. margin-top: 0;
  295. padding-bottom: 0;
  296. width: auto;
  297. .fa {
  298. margin-left: 0.5em;
  299. }
  300. }
  301. .chat-msg__author {
  302. font-size: var(--message-font-size);
  303. }
  304. .chat-msg__time {
  305. margin-left: 0;
  306. }
  307. }
  308. &.chat-msg--followup {
  309. .chat-msg__heading,
  310. .chat-msg__avatar {
  311. display: none;
  312. }
  313. &.chat-msg--with-avatar .chat-msg__content {
  314. margin-left: 2.75rem;
  315. width: 100%;
  316. }
  317. }
  318. .chat-msg__receipt {
  319. margin-left: 0.5em;
  320. margin-right: 0.5em;
  321. color: var(--message-receipt-color);
  322. }
  323. }
  324. }
  325. .chatroom-body .message {
  326. &.onload {
  327. animation: colorchange-chatmessage-muc 1s;
  328. -webkit-animation: colorchange-chatmessage-muc 1s;
  329. }
  330. .separator {
  331. border-top: 0px;
  332. border-bottom: var(--chatroom-separator-border-bottom);
  333. }
  334. }
  335. }
  336. #conversejs.converse-overlayed {
  337. .message {
  338. &.chat-msg {
  339. &.chat-msg--followup {
  340. .chat-msg__content {
  341. margin-left: 0;
  342. }
  343. }
  344. }
  345. }
  346. }
  347. @media screen and (max-width: 767px) {
  348. #conversejs:not(.converse-embedded) {
  349. .message {
  350. &.chat-msg {
  351. .chat-msg__author {
  352. white-space: normal;
  353. }
  354. }
  355. }
  356. }
  357. }