_chatbox.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. #converse-embedded-chat,
  2. #conversejs {
  3. .flyout {
  4. border-radius: $chatbox-border-radius;
  5. @media screen and (max-height: $mobile-landscape-height) {
  6. border-radius: 0;
  7. }
  8. @media screen and (max-width: $mobile-portrait-length) {
  9. border-radius: 0;
  10. }
  11. bottom: $chatbox-hover-height;
  12. position: absolute;
  13. @media screen and (max-height: $mobile-landscape-height) {
  14. bottom: 0;
  15. }
  16. @media screen and (max-width: $mobile-portrait-length) {
  17. bottom: 0;
  18. }
  19. }
  20. .chatbox-btn {
  21. border-radius: 25%;
  22. border: none;
  23. cursor: pointer;
  24. font-size: $box-close-font-size;
  25. margin: 0 0.2em;
  26. padding: 0 0 0 0.5em;
  27. text-decoration: none;
  28. &:active {
  29. position: relative;
  30. top: 1px;
  31. }
  32. }
  33. .chat-head {
  34. flex-wrap: nowrap;
  35. color: #ffffff;
  36. font-size: 100%;
  37. height: $chat-head-height;
  38. margin: 0;
  39. padding: 0.5em;
  40. position: relative;
  41. &.chat-head-chatbox {
  42. background-color: $chat-head-color;
  43. }
  44. .avatar {
  45. margin-right: 0.5em;
  46. }
  47. .chatbox-buttons {
  48. flex-direction: row-reverse;
  49. @include make-col-ready();
  50. @include make-col(3);
  51. padding: 0;
  52. }
  53. .user-custom-message {
  54. color: white;
  55. font-size: 75%;
  56. font-style: italic;
  57. overflow: hidden;
  58. text-overflow: ellipsis;
  59. white-space: nowrap;
  60. margin: 0;
  61. padding-top: 0.2em;
  62. }
  63. a, a:visited, a:hover, a:not([href]):not([tabindex]) {
  64. &.chatbox-btn {
  65. &.fa {
  66. color: white;
  67. &.button-on:before {
  68. padding: 0.2em;
  69. background-color: $chat-head-text-color;
  70. color: $chat-head-color;
  71. }
  72. }
  73. }
  74. }
  75. .chatbox-btn {
  76. color: white;
  77. &.fa {
  78. color: white;
  79. }
  80. &:active {
  81. position: relative;
  82. top: 1px;
  83. }
  84. &.button-on:before {
  85. border-radius: 5%;
  86. background-color: $chat-head-text-color;
  87. color: $chat-head-color;
  88. }
  89. }
  90. }
  91. .chatbox {
  92. text-align: left;
  93. margin: 0 $chat-gutter;
  94. @media screen and (max-height: $mobile-landscape-height) {
  95. margin: 0;
  96. width: $mobile-chat-width;
  97. }
  98. @media screen and (max-width: $mobile-portrait-length) {
  99. margin: 0;
  100. width: $mobile-chat-width;
  101. }
  102. .spoiler {
  103. background-color: lighten($chat-head-color, 50%);
  104. }
  105. .box-flyout {
  106. display: flex;
  107. flex-direction: column;
  108. justify-content: space-between;
  109. background-color: $chat-head-color;
  110. box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
  111. height: $chat-height;
  112. min-height: $chat-height/2;
  113. z-index: 1;
  114. overflow-y: scroll;
  115. width: 100%;
  116. @media screen and (max-height: $mobile-landscape-height) {
  117. height: $mobile-chat-height;
  118. width: $mobile-chat-width;
  119. height: 100vh;
  120. }
  121. @media screen and (max-width: $mobile-portrait-length) {
  122. height: $mobile-chat-height;
  123. width: $mobile-chat-width;
  124. height: 100vh;
  125. }
  126. }
  127. .chat-title {
  128. color: $chat-head-text-color;
  129. display: block;
  130. line-height: $line-height-large;
  131. overflow: hidden;
  132. text-overflow: ellipsis;
  133. white-space: nowrap;
  134. a {
  135. color: $chat-head-text-color;
  136. width: 100%;
  137. }
  138. }
  139. .chat-body {
  140. display: flex;
  141. flex-direction: column;
  142. justify-content: space-between;
  143. height: 100%;
  144. background-color: $chat-head-color;
  145. border-bottom-left-radius: $chatbox-border-radius;
  146. border-bottom-right-radius: $chatbox-border-radius;
  147. @media screen and (max-height: $mobile-landscape-height) {
  148. border-bottom-left-radius: 0;
  149. border-bottom-right-radius: 0;
  150. }
  151. @media screen and (max-width: $mobile-portrait-length) {
  152. border-bottom-left-radius: 0;
  153. border-bottom-right-radius: 0;
  154. }
  155. border-top: 0;
  156. p {
  157. color: $text-color;
  158. font-size: $font-size;
  159. margin: 0;
  160. padding: 5px;
  161. }
  162. .chat-info {
  163. line-height: $line-height-small;
  164. color: $chat-head-color;
  165. font-size: $font-size-small;
  166. margin: 0.5em;
  167. &.badge {
  168. color: $chat-head-text-color;
  169. }
  170. &.chat-state-notification {
  171. font-style: italic;
  172. }
  173. &.chat-event {
  174. clear: left;
  175. font-style: italic;
  176. }
  177. &.chat-error {
  178. color: $warning-color;
  179. font-weight: bold;
  180. }
  181. &.chat-date {
  182. display: inline-block;
  183. margin-top: 1em;
  184. }
  185. }
  186. .chat-image {
  187. height: auto;
  188. width: auto;
  189. max-height: 24em;
  190. max-width: 100%;
  191. }
  192. .chat-action {
  193. font-style: italic;
  194. }
  195. .chat-message {
  196. overflow: auto; // Ensures that content stays inside
  197. margin: 0.3em;
  198. &.onload {
  199. animation: colorchange-chatmessage 1s;
  200. -webkit-animation: colorchange-chatmessage 1s;
  201. }
  202. canvas {
  203. vertical-align: middle;
  204. background: $gray-color;
  205. }
  206. .chat-msg-author {
  207. font-weight: bold;
  208. }
  209. .chat-msg-them {
  210. color: $message-them-color;
  211. }
  212. .chat-msg-me {
  213. color: $link-color;
  214. }
  215. .chat-msg-content {
  216. max-width: 100%;
  217. word-wrap: break-word;
  218. &.spoiler {
  219. border-radius: $chatbox-border-radius;
  220. padding: 0.5em;
  221. }
  222. .emojione {
  223. margin-bottom: -6px;
  224. }
  225. }
  226. }
  227. .delayed {
  228. .chat-msg-them {
  229. color: lighten($message-them-color, 5%);
  230. }
  231. .chat-msg-me {
  232. color: lighten($link-color, 5%);
  233. }
  234. }
  235. }
  236. .new-msgs-indicator {
  237. position: absolute;
  238. width: 100%;
  239. cursor: pointer;
  240. background-color: $chat-head-color;
  241. color: $light-background-color;
  242. padding: 0.5em;
  243. font-size: 0.9em;
  244. text-align: center;
  245. z-index: 20;
  246. white-space: nowrap;
  247. }
  248. .chat-content {
  249. height: 100%;
  250. padding: 0.5em;
  251. font-size: 13px;
  252. color: $text-color;
  253. overflow-y: auto;
  254. border: 0;
  255. background-color: #ffffff;
  256. line-height: 1.3em;
  257. .toggle-spoiler:before {
  258. padding-right: 0.25em;
  259. whitespace: nowrap;
  260. }
  261. }
  262. .chat-content-sendbutton {
  263. height: calc(100% - #{$chat-textarea-height + $send-button-height + 2*$send-button-margin});
  264. }
  265. .dropdown { /* status dropdown styles */
  266. background-color: $light-background-color;
  267. dd {
  268. margin: 0;
  269. padding: 0;
  270. position: relative;
  271. }
  272. }
  273. .sendXMPPMessage {
  274. -moz-background-clip: padding;
  275. -webkit-background-clip: padding-box;
  276. @include border-bottom-radius($chatbox-border-radius);
  277. background-clip: padding-box;
  278. background-color: white;
  279. border: 0;
  280. margin: 0;
  281. padding: 0;
  282. @media screen and (max-height: $mobile-landscape-height) {
  283. width: 100%;
  284. }
  285. @media screen and (max-width: $mobile-portrait-length) {
  286. width: 100%;
  287. }
  288. .spoiler-hint {
  289. width: 100%;
  290. }
  291. .chat-textarea {
  292. border-top-left-radius: 0;
  293. border-top-right-radius: 0;
  294. @include border-bottom-radius($chatbox-border-radius);
  295. padding: 0.5em;
  296. width: 100%;
  297. border: none;
  298. min-height: $chat-textarea-height;
  299. &.spoiler {
  300. height: 42px;
  301. }
  302. }
  303. .send-button {
  304. position: absolute;
  305. left: $send-button-margin;
  306. @include calc(width, '100% - #{2*$send-button-margin}');
  307. background-color: $chat-head-color;
  308. color: $inverse-link-color;
  309. font-size: 80%;
  310. height: $send-button-height;
  311. bottom: -$send-button-height - $send-button-margin;
  312. }
  313. .chat-toolbar {
  314. box-sizing: border-box;
  315. margin: 0;
  316. padding: 0.25em;
  317. display: block;
  318. border-top: 8px solid $chat-head-color;
  319. background-color: white;
  320. color: $chat-head-color;
  321. .fa, .fa:hover {
  322. color: $chat-head-color;
  323. font-size: $font-size-large;
  324. }
  325. .unencrypted a,
  326. .unencrypted {
  327. color: $text-color;
  328. .toolbar-menu {
  329. a {
  330. color: $link-color;
  331. }
  332. }
  333. }
  334. .unverified a,
  335. .unverified {
  336. color: #cf5300;
  337. }
  338. .private a,
  339. .private {
  340. color: #4b7003;
  341. }
  342. .toggle-occupants {
  343. float: right;
  344. }
  345. li {
  346. cursor: pointer;
  347. display: inline-block;
  348. list-style: none;
  349. padding: 0 0.5em;
  350. &:hover {
  351. cursor: pointer;
  352. }
  353. .toolbar-menu {
  354. background-color: #fff;
  355. bottom: 2rem;
  356. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  357. margin-bottom: 0;
  358. min-width: 20rem;
  359. position: absolute;
  360. right: 0;
  361. top: auto;
  362. z-index: $zindex-dropdown;
  363. &.otr-menu {
  364. left: -6em;
  365. min-width: 15rem;
  366. &.show {
  367. display: flex;
  368. flex-direction: column;
  369. }
  370. }
  371. a {
  372. color: $link-color;
  373. }
  374. ul {
  375. &.emoji-picker {
  376. height: $emoji-picker-height;
  377. overflow: scroll;
  378. padding: 0.5em;
  379. }
  380. li {
  381. margin-left: 0;
  382. cursor: pointer;
  383. list-style: none;
  384. position: relative;
  385. &.emoji-skintone {
  386. }
  387. &.insert-emoji {
  388. padding: 0.2em;
  389. &.picked {
  390. background-color: $highlight-color;
  391. }
  392. &:hover {
  393. background-color: $highlight-color;
  394. }
  395. a {
  396. font-size: $font-size-huge;
  397. &:hover {
  398. color: #8f2831;
  399. }
  400. }
  401. }
  402. }
  403. }
  404. }
  405. &.toggle-smiley {
  406. a.toggle-smiley {
  407. padding: 0;
  408. }
  409. .emoji-toolbar {
  410. box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
  411. .emoji-category-picker {
  412. padding-top: 0.5em;
  413. ul {
  414. display: flex;
  415. flex-direction: row;
  416. justify-content: space-between;
  417. }
  418. }
  419. .emoji-category-picker,
  420. .emoji-skintone-picker {
  421. li {
  422. padding: 0.2em;
  423. font-size: $font-size-huge;
  424. &:hover {
  425. background-color: $highlight-color;
  426. }
  427. }
  428. }
  429. }
  430. }
  431. &.toggle-otr {
  432. ul {
  433. z-index: 99;
  434. li {
  435. &:hover {
  436. background-color: $highlight-color;
  437. }
  438. display: block;
  439. padding: 7px;
  440. a {
  441. display: block;
  442. }
  443. }
  444. }
  445. }
  446. }
  447. }
  448. }
  449. .dragresize {
  450. background: transparent;
  451. border: 0;
  452. margin: 0;
  453. position: absolute;
  454. top: 0;
  455. z-index: 20;
  456. &-top {
  457. cursor: n-resize;
  458. height: 5px;
  459. width: 100%;
  460. }
  461. &-left {
  462. cursor: w-resize;
  463. width: 5px;
  464. height: 100%;
  465. left: 0;
  466. }
  467. &-topleft {
  468. cursor: nw-resize;
  469. width: 15px;
  470. height: 15px;
  471. top: 0;
  472. left: 0;
  473. }
  474. }
  475. }
  476. }
  477. @media screen and (max-width: 767px) {
  478. #conversejs {
  479. > .row {
  480. flex-direction: row-reverse;
  481. }
  482. #converse-login-panel {
  483. .converse-form {
  484. padding: 3em 2em 3em;
  485. }
  486. }
  487. .sidebar {
  488. display: block;
  489. }
  490. .chatbox {
  491. width: calc(100% - 50px);
  492. .chat-body {
  493. .chat-message {
  494. .chat-msg-author {
  495. white-space: normal;
  496. }
  497. }
  498. }
  499. .row {
  500. .box-flyout {
  501. left: 50px;
  502. bottom: 0;
  503. height: 100vh;
  504. box-shadow: none;
  505. }
  506. }
  507. }
  508. }
  509. }