_messages.scss 9.8 KB

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