_messages.scss 11 KB

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