_messages.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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. overflow: auto; // Ensures that content stays inside
  85. padding: 0.125rem 1rem;
  86. &.onload {
  87. animation: colorchange-chatmessage 1s;
  88. -webkit-animation: colorchange-chatmessage 1s;
  89. }
  90. &:hover {
  91. background-color: rgba(0, 0, 0, 0.035);
  92. .chat-msg__actions {
  93. .chat-msg__action {
  94. opacity: 1;
  95. }
  96. }
  97. }
  98. &.correcting {
  99. &.groupchat {
  100. background-color: var(--chatroom-correcting-color);
  101. }
  102. &:not(.groupchat) {
  103. background-color: var(--chat-correcting-color);
  104. }
  105. }
  106. .spoiler {
  107. margin-top: 0.5em;
  108. }
  109. .spoiler-hint {
  110. margin-bottom: 0.5em;
  111. }
  112. .spoiler-toggle {
  113. color: white;
  114. i {
  115. color: white;
  116. padding-right: 0.5em;
  117. }
  118. &:before {
  119. padding-right: 0.25em;
  120. whitespace: nowrap;
  121. }
  122. }
  123. .chat-msg__content {
  124. display: flex;
  125. flex-direction: column;
  126. justify-content: space-between;
  127. align-items: stretch;
  128. margin-left: 0.5rem;
  129. width: calc(100% - var(--message-avatar-width));
  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. .chat-msg__message {
  152. display: inline-flex;
  153. flex-direction: column;
  154. width: 100%;
  155. overflow-wrap: break-word;
  156. }
  157. .chat-msg__edit-modal {
  158. cursor: pointer;
  159. padding-right: 0.5em;
  160. }
  161. &.headline {
  162. .chat-msg__body {
  163. margin-left: 0;
  164. }
  165. }
  166. .chat-msg__subject {
  167. font-weight: bold;
  168. clear: right;
  169. }
  170. .chat-msg__text {
  171. color: var(--message-text-color);
  172. padding: 0;
  173. width: 100%;
  174. white-space: pre-wrap;
  175. word-wrap: break-word;
  176. word-break: break-word;
  177. a {
  178. word-wrap: break-word;
  179. word-break: break-all;
  180. display: inline-block;
  181. &.chat-image__link {
  182. display: block;
  183. }
  184. }
  185. img {
  186. &.emoji {
  187. height: 1.5em;
  188. width: 1.5em;
  189. margin: 0 .05em 0 .1em;
  190. vertical-align: -0.1em;
  191. }
  192. }
  193. .emojione {
  194. margin-bottom: -6px;
  195. }
  196. }
  197. .chat-msg__text--larger {
  198. font-size: 1.6em;
  199. padding-top: 0.25em;
  200. padding-bottom: 0.25em;
  201. }
  202. .chat-msg__media {
  203. margin-top: 0.25rem;
  204. word-break: break-all;
  205. a {
  206. word-wrap: break-word;
  207. }
  208. audio {
  209. width: 100%;
  210. }
  211. }
  212. .chat-msg__actions {
  213. display: flex;
  214. flex-wrap: nowrap;
  215. .chat-msg__action {
  216. height: var(--message-font-size);
  217. font-size: var(--message-font-size);
  218. padding: 0;
  219. margin-left: 0.75em;
  220. border: none;
  221. opacity: 0;
  222. background: transparent;
  223. cursor: pointer;
  224. &:focus {
  225. opacity: 1;
  226. }
  227. }
  228. }
  229. .chat-msg__avatar {
  230. margin-top: 0.5em;
  231. vertical-align: middle;
  232. height: var(--message-avatar-height);
  233. width: var(--message-avatar-width);
  234. min-height: var(--message-avatar-height);
  235. min-width: var(--message-avatar-width);
  236. }
  237. .chat-msg__heading {
  238. width: 100%;
  239. margin-top: 0.5em;
  240. padding-right: 0.25rem;
  241. padding-bottom: 0.25rem;
  242. .chat-msg__author {
  243. overflow: hidden;
  244. text-overflow: ellipsis;
  245. white-space: nowrap;
  246. font-family: var(--heading-font);
  247. font-size: 115%;
  248. font-weight: bold;
  249. padding-bottom: 1px; // Hack to avoid cutting of text on the button
  250. }
  251. .badge {
  252. margin-left: 0.5em;
  253. font-family: var(--normal_font);
  254. }
  255. .chat-msg__time {
  256. padding-left: 0.25em;
  257. padding-right: 0.25em;
  258. color: var(--text-color-lighten-15-percent);
  259. }
  260. }
  261. &.chat-msg--action {
  262. .chat-msg__content {
  263. flex-wrap: wrap;
  264. flex-direction: row;
  265. justify-content: flex-start;
  266. }
  267. .chat-msg__text {
  268. width: auto;
  269. }
  270. .chat-msg__heading {
  271. margin-top: 0;
  272. padding-bottom: 0;
  273. width: auto;
  274. .fa {
  275. margin-left: 0.5em;
  276. }
  277. }
  278. .chat-msg__author {
  279. font-size: var(--message-font-size);
  280. }
  281. .chat-msg__time {
  282. margin-left: 0;
  283. }
  284. }
  285. &.chat-msg--followup {
  286. .chat-msg__heading,
  287. .chat-msg__avatar {
  288. display: none;
  289. }
  290. .chat-msg__content {
  291. margin-left: 2.75rem;
  292. width: 100%;
  293. }
  294. }
  295. .chat-msg__receipt {
  296. margin-right: 0.5em;
  297. color: var(--message-receipt-color);
  298. }
  299. }
  300. }
  301. .chatroom-body .message {
  302. &.onload {
  303. animation: colorchange-chatmessage-muc 1s;
  304. -webkit-animation: colorchange-chatmessage-muc 1s;
  305. }
  306. .separator {
  307. border-top: 0px;
  308. border-bottom: var(--chatroom-separator-border-bottom);
  309. }
  310. }
  311. }
  312. #conversejs.converse-overlayed {
  313. .message {
  314. &.chat-msg {
  315. &.chat-msg--followup {
  316. .chat-msg__content {
  317. margin-left: 0;
  318. }
  319. }
  320. }
  321. }
  322. }
  323. @media screen and (max-width: 767px) {
  324. #conversejs:not(.converse-embedded) {
  325. .message {
  326. &.chat-msg {
  327. .chat-msg__author {
  328. white-space: normal;
  329. }
  330. }
  331. }
  332. }
  333. }