style.css 7.8 KB

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