_messages.scss 9.3 KB

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