2
0

_messages.scss 11 KB

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