globals.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. // @tailwind base;
  2. // @tailwind components;
  3. // @tailwind utilities;
  4. @import 'tailwindcss';
  5. @import "./animation.scss";
  6. @import "./window.scss";
  7. $primary-color: #2152d1;
  8. @mixin light {
  9. --theme: light;
  10. /* color */
  11. --white: white;
  12. --black: rgb(48, 48, 48);
  13. --gray: rgb(250, 250, 250);
  14. // --primary: rgb(29, 147, 171);
  15. --primary: #4096ff;
  16. --second: rgb(231, 248, 255);
  17. --hover-color: #f3f3f3;
  18. --bar-color: rgba(0, 0, 0, 0.1);
  19. --theme-color: var(--gray);
  20. /* shadow */
  21. --shadow: 50px 50px 100px 10px rgb(0, 0, 0, 0.1);
  22. --card-shadow: 0px 2px 4px 0px rgb(0, 0, 0, 0.05);
  23. /* stroke */
  24. --border-in-light: 1px solid rgb(222, 222, 222);
  25. }
  26. .shadow-sidebar {
  27. --tw-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  28. --tw-shadow-colored: 0 0 10px var(--tw-shadow-color);
  29. box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  30. }
  31. .bg-light-sidebar{
  32. --tw-bg-opacity: 1;
  33. background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
  34. }
  35. @mixin dark {
  36. --theme: dark;
  37. /* color */
  38. --white: rgb(30, 30, 30);
  39. --black: rgb(187, 187, 187);
  40. --gray: rgb(21, 21, 21);
  41. --primary: rgb(29, 147, 171);
  42. --second: rgb(27 38 42);
  43. --hover-color: #323232;
  44. --bar-color: rgba(255, 255, 255, 0.1);
  45. --border-in-light: 1px solid rgba(255, 255, 255, 0.192);
  46. --theme-color: var(--gray);
  47. div:not(.no-dark)>svg {
  48. filter: invert(0.5);
  49. }
  50. }
  51. .light {
  52. @include light;
  53. }
  54. .dark {
  55. @include dark;
  56. }
  57. .mask {
  58. filter: invert(0.8);
  59. }
  60. :root {
  61. @include light;
  62. --window-width: 90vw;
  63. --window-height: 90vh;
  64. --sidebar-width: 300px;
  65. --window-content-width: calc(100% - var(--sidebar-width));
  66. --message-max-width: 80%;
  67. --full-height: 100%;
  68. }
  69. @media only screen and (max-width: 600px) {
  70. :root {
  71. --window-width: 100vw;
  72. --window-height: var(--full-height);
  73. --sidebar-width: 100vw;
  74. --window-content-width: var(--window-width);
  75. --message-max-width: 100%;
  76. }
  77. .no-mobile {
  78. display: none;
  79. }
  80. }
  81. @media (prefers-color-scheme: dark) {
  82. :root {
  83. @include dark;
  84. }
  85. }
  86. html {
  87. height: var(--full-height);
  88. font-family: "Noto Sans", "SF Pro SC", "SF Pro Text", "SF Pro Icons",
  89. "PingFang SC", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  90. }
  91. body {
  92. background-color: var(--gray);
  93. color: var(--black);
  94. margin: 0;
  95. padding: 0;
  96. height: var(--full-height);
  97. width: 100vw;
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. user-select: none;
  102. touch-action: pan-x pan-y;
  103. overflow: hidden;
  104. @media only screen and (max-width: 600px) {
  105. // background-color: var(--second);
  106. }
  107. *:focus-visible {
  108. outline: none;
  109. }
  110. }
  111. ::-webkit-scrollbar {
  112. --bar-width: 10px;
  113. width: var(--bar-width);
  114. height: var(--bar-width);
  115. }
  116. ::-webkit-scrollbar-track {
  117. background-color: transparent;
  118. }
  119. ::-webkit-scrollbar-thumb {
  120. background-color: var(--bar-color);
  121. border-radius: 20px;
  122. background-clip: content-box;
  123. border: 1px solid transparent;
  124. }
  125. select {
  126. border: var(--border-in-light);
  127. padding: 10px;
  128. border-radius: 10px;
  129. appearance: none;
  130. cursor: pointer;
  131. background-color: var(--white);
  132. color: var(--black);
  133. text-align: center;
  134. }
  135. label {
  136. cursor: pointer;
  137. }
  138. input {
  139. // text-align: center;
  140. font-family: inherit;
  141. }
  142. input[type="checkbox"] {
  143. cursor: pointer;
  144. background-color: var(--white);
  145. color: var(--black);
  146. appearance: none;
  147. border: var(--border-in-light);
  148. border-radius: 5px;
  149. height: 16px;
  150. width: 16px;
  151. display: inline-flex;
  152. align-items: center;
  153. justify-content: center;
  154. }
  155. input[type="checkbox"]:checked::after {
  156. display: inline-block;
  157. width: 8px;
  158. height: 8px;
  159. background-color: var(--primary);
  160. content: " ";
  161. border-radius: 2px;
  162. }
  163. input[type="range"] {
  164. appearance: none;
  165. background-color: var(--white);
  166. color: var(--black);
  167. }
  168. @mixin thumb() {
  169. appearance: none;
  170. height: 8px;
  171. width: 20px;
  172. background-color: var(--primary);
  173. border-radius: 10px;
  174. cursor: pointer;
  175. transition: all ease 0.3s;
  176. margin-left: 5px;
  177. border: none;
  178. }
  179. input[type="range"]::-webkit-slider-thumb {
  180. @include thumb();
  181. }
  182. input[type="range"]::-moz-range-thumb {
  183. @include thumb();
  184. }
  185. input[type="range"]::-ms-thumb {
  186. @include thumb();
  187. }
  188. @mixin thumbHover() {
  189. transform: scaleY(1.2);
  190. width: 24px;
  191. }
  192. input[type="range"]::-webkit-slider-thumb:hover {
  193. @include thumbHover();
  194. }
  195. input[type="range"]::-moz-range-thumb:hover {
  196. @include thumbHover();
  197. }
  198. input[type="range"]::-ms-thumb:hover {
  199. @include thumbHover();
  200. }
  201. input[type="number"],
  202. input[type="text"],
  203. input[type="password"] {
  204. appearance: none;
  205. border-radius: 10px;
  206. border: var(--border-in-light);
  207. min-height: 36px;
  208. box-sizing: border-box;
  209. background: var(--white);
  210. color: var(--black);
  211. padding: 0 10px;
  212. max-width: 50%;
  213. font-family: inherit;
  214. }
  215. div.math {
  216. overflow-x: auto;
  217. }
  218. .modal-mask {
  219. z-index: 9999;
  220. position: fixed;
  221. top: 0;
  222. left: 0;
  223. height: var(--full-height);
  224. width: 100vw;
  225. background-color: rgba($color: #000000, $alpha: 0.5);
  226. display: flex;
  227. align-items: center;
  228. justify-content: center;
  229. @media screen and (max-width: 600px) {
  230. align-items: flex-end;
  231. }
  232. }
  233. .link {
  234. font-size: 12px;
  235. color: var(--primary);
  236. text-decoration: none;
  237. &:hover {
  238. text-decoration: underline;
  239. }
  240. }
  241. pre {
  242. position: relative;
  243. &:hover .copy-code-button {
  244. pointer-events: all;
  245. transform: translateX(0px);
  246. opacity: 0.5;
  247. }
  248. .copy-code-button {
  249. position: absolute;
  250. right: 10px;
  251. top: 1em;
  252. cursor: pointer;
  253. padding: 0px 5px;
  254. background-color: var(--black);
  255. color: var(--white);
  256. border: var(--border-in-light);
  257. border-radius: 10px;
  258. transform: translateX(10px);
  259. pointer-events: none;
  260. opacity: 0;
  261. transition: all ease 0.3s;
  262. &:after {
  263. content: "复制";
  264. }
  265. &:hover {
  266. opacity: 1;
  267. }
  268. }
  269. }
  270. .clickable {
  271. cursor: pointer;
  272. &:hover {
  273. filter: brightness(0.9);
  274. }
  275. &:focus {
  276. filter: brightness(0.95);
  277. }
  278. }
  279. .error {
  280. width: 80%;
  281. border-radius: 20px;
  282. border: var(--border-in-light);
  283. box-shadow: var(--card-shadow);
  284. padding: 20px;
  285. overflow: auto;
  286. background-color: var(--white);
  287. color: var(--black);
  288. pre {
  289. overflow: auto;
  290. }
  291. }
  292. .password-input-container {
  293. max-width: 50%;
  294. display: flex;
  295. justify-content: flex-end;
  296. .password-eye {
  297. margin-right: 4px;
  298. }
  299. .password-input {
  300. min-width: 80%;
  301. }
  302. }
  303. .user-avatar {
  304. height: 30px;
  305. min-height: 30px;
  306. width: 30px;
  307. min-width: 30px;
  308. display: flex;
  309. align-items: center;
  310. justify-content: center;
  311. border: var(--border-in-light);
  312. box-shadow: var(--card-shadow);
  313. border-radius: 11px;
  314. background: #e7f8ff;
  315. }
  316. .one-line {
  317. white-space: nowrap;
  318. overflow: hidden;
  319. text-overflow: ellipsis;
  320. }
  321. .copyable {
  322. user-select: text;
  323. }