_chatbox.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. display: block;
  13. position: absolute;
  14. @media screen and (max-height: $mobile-landscape-height) {
  15. bottom: 0;
  16. }
  17. @media screen and (max-width: $mobile-portrait-length) {
  18. bottom: 0;
  19. }
  20. }
  21. .chat-head {
  22. color: #ffffff;
  23. font-size: 100%;
  24. height: $chat-head-height;
  25. margin: 0;
  26. padding: 0.5em;
  27. position: relative;
  28. .avatar {
  29. margin-right: 0.5em;
  30. border-radius: 50%;
  31. float: left;
  32. }
  33. &.chat-head-chatbox {
  34. background-color: $chat-head-color;
  35. }
  36. .user-custom-message {
  37. color: white;
  38. font-size: 75%;
  39. font-style: italic;
  40. overflow: hidden;
  41. text-overflow: ellipsis;
  42. white-space: nowrap;
  43. margin: 0;
  44. padding-top: 0.2em;
  45. }
  46. }
  47. .chatbox-btn {
  48. border-radius: 25%;
  49. border: none;
  50. color: white;
  51. cursor: pointer;
  52. display: inline-block;
  53. float: right;
  54. font-size: $box-close-font-size;
  55. margin: 0 0.2em;
  56. padding: 0.3em;
  57. text-decoration: none;
  58. &:active {
  59. position: relative;
  60. top: 1px;
  61. }
  62. &.button-on {
  63. background-color: white;
  64. color: $chat-head-color;
  65. }
  66. }
  67. .chatbox {
  68. display: block;
  69. text-align: left;
  70. float: right;
  71. height: $bottom-gutter-height;
  72. margin: 0 $chat-gutter;
  73. width: $chat-width;
  74. @media screen and (max-height: $mobile-landscape-height) {
  75. margin: 0;
  76. width: $mobile-chat-width;
  77. }
  78. @media screen and (max-width: $mobile-portrait-length) {
  79. margin: 0;
  80. width: $mobile-chat-width;
  81. }
  82. .box-flyout {
  83. background-color: white;
  84. box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
  85. height: $chat-height;
  86. min-height: $chat-height/2;
  87. min-width: $chat-width;
  88. width: $chat-width;
  89. z-index: 1;
  90. @media screen and (max-height: $mobile-landscape-height) {
  91. height: $mobile-chat-height;
  92. width: $mobile-chat-width;
  93. height: 100vh;
  94. }
  95. @media screen and (max-width: $mobile-portrait-length) {
  96. height: $mobile-chat-height;
  97. width: $mobile-chat-width;
  98. height: 100vh;
  99. }
  100. }
  101. .chat-title {
  102. color: $chat-head-text-color;
  103. line-height: 15px;
  104. display: block;
  105. text-overflow: ellipsis;
  106. overflow: hidden;
  107. a {
  108. color: $chat-head-text-color;
  109. width: 100%;
  110. }
  111. }
  112. .chat-body {
  113. background-color: white;
  114. border-bottom-left-radius: $chatbox-border-radius;
  115. border-bottom-right-radius: $chatbox-border-radius;
  116. @media screen and (max-height: $mobile-landscape-height) {
  117. border-bottom-left-radius: 0;
  118. border-bottom-right-radius: 0;
  119. }
  120. @media screen and (max-width: $mobile-portrait-length) {
  121. border-bottom-left-radius: 0;
  122. border-bottom-right-radius: 0;
  123. }
  124. border-top: 0;
  125. height: 289px;
  126. @include calc(height, '100% - #{$chat-head-height}');
  127. p {
  128. color: $text-color;
  129. font-size: $font-size;
  130. margin: 0;
  131. padding: 5px;
  132. }
  133. .chat-info {
  134. line-height: $line-height-small;
  135. color: $chat-head-color;
  136. font-size: $font-size-small;
  137. margin: 0.3em;
  138. &.chat-event {
  139. clear: left;
  140. font-style: italic;
  141. }
  142. &.chat-error {
  143. color: $warning-color;
  144. font-weight: bold;
  145. }
  146. &.chat-date {
  147. display: inline-block;
  148. margin-top: 1em;
  149. }
  150. }
  151. .chat-image {
  152. max-height: 24em;
  153. max-width: 100%;
  154. }
  155. .chat-action {
  156. font-style: italic;
  157. }
  158. .chat-message {
  159. margin: 0.3em;
  160. span {
  161. &.chat-msg-author {
  162. font-weight: bold;
  163. white-space: nowrap;
  164. float: left;
  165. text-overflow: ellipsis;
  166. overflow: hidden;
  167. }
  168. &.chat-msg-them {
  169. color: $message-them-color;
  170. }
  171. &.chat-msg-me {
  172. color: $link-color;
  173. }
  174. &.chat-msg-content {
  175. max-width: 100%;
  176. word-wrap: break-word;
  177. }
  178. }
  179. }
  180. .delayed {
  181. .chat-msg-them {
  182. color: #FB5D50;
  183. }
  184. .chat-msg-me {
  185. color: #7EABBB;
  186. }
  187. }
  188. }
  189. .new-msgs-indicator {
  190. position: absolute;
  191. width: 100%;
  192. cursor: pointer;
  193. background-color: $chat-head-color;
  194. color: $light-background-color;
  195. padding: 0.5em;
  196. font-size: 0.9em;
  197. text-align: center;
  198. z-index: 20;
  199. white-space: nowrap;
  200. }
  201. .chat-content {
  202. position: relative;
  203. padding: 0.5em;
  204. font-size: 13px;
  205. color: $text-color;
  206. overflow-y: auto;
  207. border: 0;
  208. background-color: #ffffff;
  209. line-height: 1.3em;
  210. height: 206px;
  211. height: calc(100% - #{$toolbar-height + $chat-textarea-height +1px});
  212. }
  213. .chat-content-sendbutton {
  214. height: calc(100% - #{$toolbar-height + $chat-textarea-height + $send-button-height + 2*$send-button-margin});
  215. }
  216. .dropdown { /* status dropdown styles */
  217. background-color: $light-background-color;
  218. dd {
  219. margin: 0;
  220. padding: 0;
  221. position: relative;
  222. }
  223. }
  224. form.sendXMPPMessage {
  225. -moz-background-clip: padding;
  226. -webkit-background-clip: padding-box;
  227. @include border-bottom-radius($chatbox-border-radius);
  228. background-clip: padding-box;
  229. border-top: 1px solid #BBB;
  230. border: 0;
  231. margin: 0;
  232. padding: 0;
  233. position: relative;
  234. height: #{$chat-textarea-height + $toolbar-height};
  235. min-width: $chat-width;
  236. @media screen and (max-height: $mobile-landscape-height) {
  237. width: 100%;
  238. }
  239. @media screen and (max-width: $mobile-portrait-length) {
  240. width: 100%;
  241. }
  242. .chat-textarea {
  243. @include border-bottom-radius($chatbox-border-radius);
  244. border: 0;
  245. height: $chat-textarea-height;
  246. padding: 0.5em;
  247. width: 100%;
  248. resize: none;
  249. }
  250. .send-button {
  251. position: absolute;
  252. left: $send-button-margin;
  253. @include calc(width, '100% - #{2*$send-button-margin}');
  254. background-color: $chat-head-color;
  255. color: $inverse-link-color;
  256. font-size: 80%;
  257. height: $send-button-height;
  258. bottom: -$send-button-height - $send-button-margin;
  259. }
  260. .chat-toolbar {
  261. box-sizing: border-box;
  262. margin: 0;
  263. padding: 5px;
  264. height: $toolbar-height;
  265. display: block;
  266. background-color: $toolbar-color;
  267. a {
  268. font-size: $font-size;
  269. color: $text-color;
  270. text-decoration: none;
  271. text-shadow: none;
  272. }
  273. .emoji-picker {
  274. margin-bottom: $toolbar-height + 5px;
  275. }
  276. .toolbar-picker-panel {
  277. a {
  278. color: $link-color;
  279. }
  280. }
  281. .chat-toolbar-text {
  282. font-size: 12px;
  283. padding-right: 3px;
  284. }
  285. .unencrypted a,
  286. .unencrypted {
  287. color: $text-color;
  288. .toolbar-picker-panel {
  289. a {
  290. color: $link-color;
  291. }
  292. }
  293. }
  294. .unverified a,
  295. .unverified {
  296. color: #cf5300;
  297. }
  298. .private a,
  299. .private {
  300. color: #4b7003;
  301. }
  302. .toggle-occupants,
  303. .toggle-clear,
  304. .toggle-otr {
  305. float: right;
  306. }
  307. li {
  308. display: inline-block;
  309. list-style: none;
  310. padding: 0 3px 0 3px;
  311. cursor: pointer;
  312. margin-top: 1px;
  313. }
  314. li:hover {
  315. cursor: pointer;
  316. }
  317. ul {
  318. background: #fff;
  319. bottom: 100%;
  320. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  321. font-size: 12px;
  322. margin: 0;
  323. position: absolute;
  324. right: 0;
  325. li {
  326. cursor: pointer;
  327. list-style: none;
  328. position: relative;
  329. a:hover {
  330. color: #8f2831;
  331. }
  332. }
  333. }
  334. li {
  335. margin-left: 0;
  336. }
  337. .toggle-smiley {
  338. color: $text-color;
  339. padding-left: 5px;
  340. ul {
  341. &.emoji-category-picker {
  342. z-index: 100;
  343. .picked {
  344. background-color: $highlight-color;
  345. }
  346. }
  347. &.emoji-picker {
  348. height: 250px;
  349. overflow: scroll;
  350. }
  351. left: 0;
  352. li {
  353. font-size: $font-size;
  354. padding: 5px;
  355. z-index: 98;
  356. }
  357. li:hover {
  358. background-color: $highlight-color;
  359. }
  360. }
  361. }
  362. .toggle-otr {
  363. ul {
  364. li {
  365. padding: 7px;
  366. background-color: white;
  367. display: block;
  368. z-index: 99;
  369. a {
  370. -moz-transition: background-color 0.2s ease-in-out;
  371. -webkit-transition: background-color 0.2s ease-in-out;
  372. transition: background-color 0.2s ease-in-out;
  373. display: block;
  374. padding: 1px;
  375. text-decoration: none;
  376. }
  377. }
  378. li:hover {
  379. background-color: $highlight-color;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. .dragresize {
  386. background: transparent;
  387. border: 0;
  388. margin: 0;
  389. position: absolute;
  390. top: 0;
  391. z-index: 20;
  392. &-top {
  393. cursor: n-resize;
  394. height: 5px;
  395. width: 100%;
  396. }
  397. &-left {
  398. cursor: w-resize;
  399. width: 5px;
  400. height: 100%;
  401. left: 0;
  402. }
  403. &-topleft {
  404. cursor: nw-resize;
  405. width: 15px;
  406. height: 15px;
  407. top: 0;
  408. left: 0;
  409. }
  410. }
  411. }
  412. }