style.css 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. body, html {
  2. width: 100%;
  3. height: 100%;
  4. padding: 0;
  5. margin: 0;
  6. font-family: Cantarell, Lato, -apple-system, BlinkMacSystemFont, sapphire-emoji, sans-serif;
  7. /* We need to establish a font-size globally so we can set min-height correctly. TODO: Do we want a preprocessor of some kind? */
  8. font-size: 1em;
  9. background-color: var(--bg-color);
  10. color: var(--text-color);
  11. /* Don't break the layout */
  12. word-break: break-word;
  13. }
  14. /* Arc Dark */
  15. input, button, textarea {
  16. background-color: var(--button-bg-color) !important;
  17. color: var(--button-text-color) !important;
  18. padding: 0.5em;
  19. /* Nice rounded corners */
  20. border-radius: 0.3em;
  21. border-style: none;
  22. /* Fix the font -- I don't know why this has to be explicit, but hey! */
  23. font-family: Cantarell, Lato, -apple-system, BlinkMacSystemFont, sapphire-emoji, sans-serif;
  24. }
  25. button, input[type=button], input[type=submit] {
  26. cursor: pointer;
  27. }
  28. ::-webkit-scrollbar {
  29. background-color: var(--scroll-color);
  30. }
  31. ::-webkit-scrollbar-thumb {
  32. background-color: var(--scroll-thumb-color);
  33. border-radius: 1em;
  34. }
  35. a, a:visited {
  36. color: var(--link-color);
  37. }
  38. .icon {
  39. height: 0.75em;
  40. width: 0.75em;
  41. }
  42. #app {
  43. position: absolute;
  44. display: flex;
  45. flex-direction: row;
  46. width: 100%;
  47. height: 100%;
  48. }
  49. #app > .pane {
  50. width: 100%;
  51. height: 100%;
  52. display: flex;
  53. flex-direction: column;
  54. }
  55. #buddy-list-pane, #chat-user-list-pane {
  56. min-width: 58px;
  57. max-width: 250px;
  58. background: var(--bg-accent-color);
  59. overflow-x: hidden;
  60. padding: 2px 0;
  61. box-sizing: border-box;
  62. }
  63. #chat-pane {
  64. display: flex;
  65. flex-direction: column;
  66. min-width: 300px;
  67. padding: 4px 20px 4px 20px;
  68. box-sizing: border-box;
  69. }
  70. #app:not(.chat) #chat-user-list-pane {
  71. display: none;
  72. }
  73. .pane-scroller {
  74. flex-grow: 1;
  75. overflow-y: scroll;
  76. }
  77. .pane-footer {
  78. border-top: 1px solid var(--border-color);
  79. font-size: 1.5em;
  80. padding: 5px;
  81. display: flex;
  82. flex-direction: row;
  83. justify-content: space-between;
  84. /* Don't squish */
  85. min-height: 1em;
  86. align-items: center;
  87. }
  88. #buddy-list-pane button {
  89. width: 100%;
  90. }
  91. #add-buddy {
  92. color: var(--text-color) !important;
  93. }
  94. #change-avatar {
  95. color: var(--text-color) !important;
  96. }
  97. .user, #chat-list .chat {
  98. /* You: "Seriously, Florrie? You need display: flex for THIS?!" */
  99. display: flex;
  100. flex-direction: row;
  101. align-items: center;
  102. color: inherit;
  103. text-decoration: none;
  104. height: 40px;
  105. padding: 0 8px;
  106. box-sizing: border-box;
  107. }
  108. .user:focus:not(.selected), #chat-list .chat:focus:not(.selected) {
  109. background-color: var(--chat-switch-color);
  110. filter: brightness(1.4);
  111. }
  112. .user.selected, #chat-list .chat.selected {
  113. background-color: var(--accent-button-bg-color);
  114. color: var(--accent-button-text-color);
  115. }
  116. .user.selected .user-name, #chat-list .chat.selected .chat-name {
  117. color: var(--select-text-color);
  118. }
  119. /* For unselected, unread bolds, typing greens. Unread implies not selected;
  120. * typing may or may not be selected. Unread but not typing is blued, as per
  121. * Pidgin conventions */
  122. .user.unread {
  123. font-weight: 800;
  124. }
  125. .user.typing:not(.selected) {
  126. color: var(--buddy-typing-color);
  127. }
  128. .user.unread:not(.typing) .user-name {
  129. color: var(--buddy-unread-color);
  130. }
  131. .user-avatar {
  132. /* min so that it works with flex - otherwise it gets shrunk to the size
  133. * of the img, which makes the user's name appear offset to be closer to
  134. * the image. */
  135. min-width: 30px;
  136. height: 30px;
  137. }
  138. .inner-avatar {
  139. width: 100%;
  140. height: auto;
  141. }
  142. .user-avatar .inner-avatar {
  143. max-width: 30px;
  144. max-height: 30px;
  145. border-radius: 2px;
  146. }
  147. .user-name, .chat-name {
  148. flex-grow: 1;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. margin-left: 8px;
  152. margin-right: 4px;
  153. white-space: nowrap;
  154. }
  155. /* Needs to be overrided explicitly due to a:visited nonsense */
  156. .user:not([data-status-id=offline]) {
  157. color: var(--text-color) !important;
  158. }
  159. .user[data-status-id=offline] {
  160. color: var(--text-disabled-color);
  161. }
  162. #chat-list .chat {
  163. color: var(--text-color);
  164. }
  165. /* Status colors themselves, besdies the grey already specified */
  166. .status-online, .status-available {
  167. color: var(--status-online-color);
  168. }
  169. .status-away {
  170. color: var(--status-away-color);
  171. }
  172. .status-dnd {
  173. color: var(--status-dnd-color);
  174. }
  175. .user[data-status-id=offline] .user-avatar .inner-avatar {
  176. filter: saturate(0);
  177. opacity: 0.8;
  178. }
  179. .group-heading {
  180. border-bottom: 1px solid var(--border-color);
  181. padding-left: 4px;
  182. font-weight: 800;
  183. margin-top: 4px;
  184. }
  185. #message-list-container {
  186. padding: 10px;
  187. flex-grow: 1;
  188. overflow-x: hidden;
  189. overflow-y: scroll;
  190. }
  191. /* Focusing on the message list container is just used to redirect focus to
  192. * the input text field, since logically these are the same. Accordingly,
  193. * disable the outline on both
  194. */
  195. #message-list-container:focus, input[data-id=input]:focus {
  196. outline: none;
  197. }
  198. #chat-input-area {
  199. padding: 10px;
  200. border-top: 1px solid var(--border-color);
  201. }
  202. #chat-form {
  203. display: flex;
  204. flex-direction: row;
  205. /* Corresponds to font size + padding */
  206. min-height: 1.5em;
  207. }
  208. #chat-form textarea {
  209. width: 100%;
  210. min-width: 0;
  211. flex-grow: 1;
  212. resize: none;
  213. margin-right: 6px;
  214. box-sizing: content-box;
  215. }
  216. input[data-id=input] {
  217. flex-grow: 1;
  218. margin-right: 5px;
  219. }
  220. #typing-indicator {
  221. margin-top: 4px;
  222. font-size: 0.7em;
  223. height: 0.7em;
  224. opacity: 0.8;
  225. }
  226. .message-group {
  227. padding: 10px 0;
  228. }
  229. .message-group:not(:first-child) {
  230. border-top: 1px solid var(--message-border-color);
  231. }
  232. .message-group {
  233. display: flex;
  234. flex-direction: row;
  235. }
  236. .message-group-avatar .inner-avatar {
  237. width: 40px;
  238. height: 40px;
  239. margin-right: 12px;
  240. border-radius: 3px;
  241. }
  242. .message {
  243. margin-bottom: 2px;
  244. }
  245. .message-author {
  246. font-weight: 800;
  247. }
  248. .message-content {
  249. white-space: pre-wrap;
  250. }
  251. /* DO NOT CHANGE this max-width value without updating the MOBILE_WIDTH JS constant! */
  252. @media only screen and (max-width: 600px) {
  253. #app.show-chat-area > #buddy-list-pane {
  254. display: none;
  255. }
  256. #app.show-buddy-list > #chat-pane {
  257. display: none;
  258. }
  259. #app.show-buddy-list > #chat-user-list-pane {
  260. display: none;
  261. }
  262. #buddy-list-pane {
  263. max-width: 100%;
  264. }
  265. #room-back {
  266. display: flex !important;
  267. }
  268. }
  269. #app:not(.show-chat-user-list) > #chat-user-list-pane {
  270. display: none;
  271. }
  272. #room-info {
  273. display: flex;
  274. flex-direction: row;
  275. min-width: 0;
  276. flex-shrink: 0;
  277. padding-bottom: 3px;
  278. border-bottom: 1px solid var(--border-color);
  279. }
  280. #room-info-content {
  281. flex-grow: 1;
  282. min-width: 0;
  283. display: flex;
  284. flex-direction: row;
  285. }
  286. .room-name-topic-container {
  287. display: flex;
  288. flex-direction: column;
  289. }
  290. #room-info-content .room-name {
  291. font-size: 1.5em;
  292. font-weight: bold;
  293. }
  294. #room-info-content .room-name, #room-info-content .room-topic {
  295. white-space: nowrap;
  296. overflow-x: hidden;
  297. text-overflow: ellipsis;
  298. }
  299. .room-avatar {
  300. height: 100%;
  301. width: 40px;
  302. margin-right: 10px;
  303. display: flex;
  304. align-items: center;
  305. }
  306. .room-button {
  307. display: flex;
  308. flex-shrink: 0;
  309. font-size: 1.5em;
  310. align-items: center;
  311. justify-content: center;
  312. padding: 0 10px;
  313. color: var(--button-text-color) !important;
  314. text-decoration: none;
  315. }
  316. .room-button > img {
  317. height: 1.75em;
  318. width: auto;
  319. flex-shrink: 0;
  320. }
  321. #room-back {
  322. display: none;
  323. }
  324. #app:not(.chat) #toggle-chat-user-list {
  325. display: none;
  326. }
  327. /* Modals */
  328. #modal-screen {
  329. background-color: var(--modal-screen-bg-color);
  330. }
  331. #modal-screen:not(.visible) { display: none; }
  332. /* Login screen is not a modal, but follows the same "center the content" rules. */
  333. #modal-screen, #login-screen {
  334. position: absolute;
  335. width: 100%;
  336. height: 100%;
  337. /* Yes, more flex. Seriously, this is the one case where it is MEANT to be useful. */
  338. display: flex;
  339. flex-direction: column;
  340. justify-content: center;
  341. align-items: center;
  342. }
  343. #modal-content {
  344. padding: 20px;
  345. background-color: var(--modal-content-bg-color);
  346. color: var(--modal-text-color);
  347. border-radius: 5px;
  348. box-shadow: 0 0 8px black;
  349. max-width: 600px;
  350. margin: 10px;
  351. }
  352. #modal-content .actions {
  353. width: 100%;
  354. display: flex;
  355. flex-direction: row;
  356. }
  357. #modal-content .actions input {
  358. flex-grow: 1;
  359. margin: 5px;
  360. }
  361. #modal-content input[type=submit] {
  362. background-color: var(--accent-button-bg-color) !important;
  363. color: var(--accent-button-text-color);
  364. }
  365. /* Login screen! */
  366. #login-screen {
  367. background-color: var(--bg-color);
  368. }
  369. #login-screen:not(.visible),
  370. #login-status:not(.visible),
  371. #login-form:not(.visible) { display: none; }
  372. #login-content, #login-form {
  373. text-align: center;
  374. }
  375. #login-content h1, #modal-content h1 {
  376. margin-top: 0;
  377. margin-bottom: 0.4em;
  378. }
  379. #login-content label, #modal-content label {
  380. display: block;
  381. margin-bottom: 0.8em;
  382. }
  383. #login-content input[type=submit] {
  384. width: 100%;
  385. background-color: var(--accent-button-bg-color) !important;
  386. color: var(--accent-button-text-color) !important;
  387. }