_messages.scss 12 KB

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