_messages.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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. }
  182. img {
  183. &.emoji {
  184. height: 1.5em;
  185. width: 1.5em;
  186. margin: 0 .05em 0 .1em;
  187. vertical-align: -0.1em;
  188. }
  189. }
  190. .emojione {
  191. margin-bottom: -6px;
  192. }
  193. }
  194. .chat-msg__text--larger {
  195. font-size: 1.6em;
  196. padding-top: 0.25em;
  197. padding-bottom: 0.25em;
  198. }
  199. .chat-msg__media {
  200. margin-top: 0.25rem;
  201. word-break: break-all;
  202. a {
  203. word-wrap: break-word;
  204. }
  205. audio {
  206. width: 100%;
  207. }
  208. }
  209. .chat-msg__actions {
  210. display: flex;
  211. flex-wrap: nowrap;
  212. .chat-msg__action {
  213. height: var(--message-font-size);
  214. font-size: var(--message-font-size);
  215. padding: 0;
  216. margin-left: 0.75em;
  217. border: none;
  218. opacity: 0;
  219. background: transparent;
  220. cursor: pointer;
  221. &:focus {
  222. opacity: 1;
  223. }
  224. }
  225. }
  226. .chat-msg__avatar {
  227. margin-top: 0.5em;
  228. vertical-align: middle;
  229. height: var(--message-avatar-height);
  230. width: var(--message-avatar-width);
  231. min-height: var(--message-avatar-height);
  232. min-width: var(--message-avatar-width);
  233. }
  234. .chat-msg__heading {
  235. width: 100%;
  236. margin-top: 0.5em;
  237. padding-right: 0.25rem;
  238. padding-bottom: 0.25rem;
  239. display: flex;
  240. .chat-msg__author {
  241. overflow: hidden;
  242. text-overflow: ellipsis;
  243. white-space: nowrap;
  244. font-family: var(--heading-font);
  245. font-size: 115%;
  246. font-weight: bold;
  247. padding-bottom: 1px; // Hack to avoid cutting of text on the button
  248. }
  249. .badge {
  250. margin-left: 0.5em;
  251. font-family: var(--normal_font);
  252. }
  253. .chat-msg__time {
  254. padding-left: 0.25em;
  255. padding-right: 0.25em;
  256. color: var(--text-color-lighten-15-percent);
  257. }
  258. }
  259. &.chat-msg--action {
  260. .chat-msg__content {
  261. flex-wrap: wrap;
  262. flex-direction: row;
  263. justify-content: flex-start;
  264. }
  265. .chat-msg__text {
  266. width: auto;
  267. }
  268. .chat-msg__heading {
  269. margin-top: 0;
  270. padding-bottom: 0;
  271. width: auto;
  272. .fa {
  273. margin-left: 0.5em;
  274. }
  275. }
  276. .chat-msg__author {
  277. font-size: var(--message-font-size);
  278. }
  279. .chat-msg__time {
  280. margin-left: 0;
  281. }
  282. }
  283. &.chat-msg--followup {
  284. .chat-msg__heading,
  285. .chat-msg__avatar {
  286. display: none;
  287. }
  288. .chat-msg__content {
  289. margin-left: 2.75rem;
  290. width: 100%;
  291. }
  292. }
  293. .chat-msg__receipt {
  294. margin-right: 0.5em;
  295. color: var(--message-receipt-color);
  296. }
  297. }
  298. }
  299. .chatroom-body .message {
  300. &.onload {
  301. animation: colorchange-chatmessage-muc 1s;
  302. -webkit-animation: colorchange-chatmessage-muc 1s;
  303. }
  304. .separator {
  305. border-top: 0px;
  306. border-bottom: var(--chatroom-separator-border-bottom);
  307. }
  308. }
  309. }
  310. #conversejs.converse-overlayed {
  311. .message {
  312. &.chat-msg {
  313. &.chat-msg--followup {
  314. .chat-msg__content {
  315. margin-left: 0;
  316. }
  317. }
  318. }
  319. }
  320. }
  321. @media screen and (max-width: 767px) {
  322. #conversejs:not(.converse-embedded) {
  323. .message {
  324. &.chat-msg {
  325. .chat-msg__author {
  326. white-space: normal;
  327. }
  328. }
  329. }
  330. }
  331. }