themes.scss 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. @mixin base-theme {
  2. --font-sans: "Inter", sans-serif;
  3. --font-mono: "Roboto Mono", monospace;
  4. --font-icon: "Material Icons";
  5. }
  6. @mixin dark-theme {
  7. --primary-color: theme("colors.true-gray.900");
  8. --primary-light-color: theme("colors.dark.600");
  9. --primary-dark-color: theme("colors.true-gray.800");
  10. --secondary-color: theme("colors.true-gray.400");
  11. --secondary-light-color: theme("colors.true-gray.500");
  12. --secondary-dark-color: theme("colors.true-gray.100");
  13. --divider-color: theme("colors.true-gray.800");
  14. --divider-light-color: theme("colors.dark.500");
  15. --divider-dark-color: theme("colors.dark.300");
  16. --error-color: theme("colors.warm-gray.800");
  17. --tooltip-color: theme("colors.true-gray.100");
  18. --popover-color: theme("colors.dark.700");
  19. --editor-theme: "merbivore_soft";
  20. }
  21. @mixin light-theme {
  22. --primary-color: theme("colors.white");
  23. --primary-light-color: theme("colors.true-gray.50");
  24. --primary-dark-color: theme("colors.true-gray.100");
  25. --secondary-color: theme("colors.true-gray.500");
  26. --secondary-light-color: theme("colors.true-gray.400");
  27. --secondary-dark-color: theme("colors.true-gray.900");
  28. --divider-color: theme("colors.true-gray.200");
  29. --divider-light-color: theme("colors.true-gray.100");
  30. --divider-dark-color: theme("colors.true-gray.300");
  31. --error-color: theme("colors.yellow.100");
  32. --tooltip-color: theme("colors.true-gray.800");
  33. --popover-color: theme("colors.white");
  34. --editor-theme: "textmate";
  35. }
  36. @mixin black-theme {
  37. --primary-color: theme("colors.dark.900");
  38. --primary-light-color: theme("colors.true-gray.900");
  39. --primary-dark-color: theme("colors.dark.800");
  40. --secondary-color: theme("colors.true-gray.400");
  41. --secondary-light-color: theme("colors.true-gray.500");
  42. --secondary-dark-color: theme("colors.true-gray.100");
  43. --divider-color: theme("colors.true-gray.800");
  44. --divider-light-color: theme("colors.dark.700");
  45. --divider-dark-color: theme("colors.dark.300");
  46. --error-color: theme("colors.warm-gray.900");
  47. --tooltip-color: theme("colors.true-gray.100");
  48. --popover-color: theme("colors.dark.700");
  49. --editor-theme: "twilight";
  50. }
  51. @mixin dark-editor-theme {
  52. --editor-type-color: theme("colors.purple.500");
  53. --editor-name-color: theme("colors.blue.500");
  54. --editor-operator-color: theme("colors.indigo.500");
  55. --editor-invalid-color: theme("colors.red.500");
  56. --editor-separator-color: theme("colors.gray.500");
  57. --editor-meta-color: theme("colors.gray.500");
  58. --editor-variable-color: theme("colors.green.500");
  59. --editor-link-color: theme("colors.cyan.500");
  60. --editor-process-color: theme("colors.gray.400");
  61. --editor-constant-color: theme("colors.fuchsia.500");
  62. --editor-keyword-color: theme("colors.pink.500");
  63. }
  64. @mixin light-editor-theme {
  65. --editor-type-color: theme("colors.purple.600");
  66. --editor-name-color: theme("colors.red.600");
  67. --editor-operator-color: theme("colors.indigo.600");
  68. --editor-invalid-color: theme("colors.red.600");
  69. --editor-separator-color: theme("colors.gray.600");
  70. --editor-meta-color: theme("colors.gray.600");
  71. --editor-variable-color: theme("colors.green.600");
  72. --editor-link-color: theme("colors.cyan.600");
  73. --editor-process-color: theme("colors.blue.600");
  74. --editor-constant-color: theme("colors.fuchsia.600");
  75. --editor-keyword-color: theme("colors.pink.600");
  76. }
  77. @mixin black-editor-theme {
  78. --editor-type-color: theme("colors.purple.400");
  79. --editor-name-color: theme("colors.gray.400");
  80. --editor-operator-color: theme("colors.indigo.400");
  81. --editor-invalid-color: theme("colors.red.400");
  82. --editor-separator-color: theme("colors.gray.400");
  83. --editor-meta-color: theme("colors.gray.400");
  84. --editor-variable-color: theme("colors.green.400");
  85. --editor-link-color: theme("colors.cyan.400");
  86. --editor-process-color: theme("colors.blue.400");
  87. --editor-constant-color: theme("colors.fuchsia.400");
  88. --editor-keyword-color: theme("colors.pink.400");
  89. }
  90. @mixin green-theme {
  91. --accent-color: theme("colors.green.500");
  92. --accent-light-color: theme("colors.green.400");
  93. --accent-dark-color: theme("colors.green.600");
  94. --accent-contrast-color: theme("colors.white");
  95. --gradient-from-color: theme("colors.green.200");
  96. --gradient-via-color: theme("colors.green.400");
  97. --gradient-to-color: theme("colors.green.600");
  98. }
  99. @mixin teal-theme {
  100. --accent-color: theme("colors.teal.500");
  101. --accent-light-color: theme("colors.teal.400");
  102. --accent-dark-color: theme("colors.teal.600");
  103. --accent-contrast-color: theme("colors.white");
  104. --gradient-from-color: theme("colors.teal.200");
  105. --gradient-via-color: theme("colors.teal.400");
  106. --gradient-to-color: theme("colors.teal.600");
  107. }
  108. @mixin blue-theme {
  109. --accent-color: theme("colors.blue.500");
  110. --accent-light-color: theme("colors.blue.400");
  111. --accent-dark-color: theme("colors.blue.600");
  112. --accent-contrast-color: theme("colors.white");
  113. --gradient-from-color: theme("colors.blue.200");
  114. --gradient-via-color: theme("colors.blue.400");
  115. --gradient-to-color: theme("colors.blue.600");
  116. }
  117. @mixin indigo-theme {
  118. --accent-color: theme("colors.indigo.500");
  119. --accent-light-color: theme("colors.indigo.400");
  120. --accent-dark-color: theme("colors.indigo.600");
  121. --accent-contrast-color: theme("colors.white");
  122. --gradient-from-color: theme("colors.indigo.200");
  123. --gradient-via-color: theme("colors.indigo.400");
  124. --gradient-to-color: theme("colors.indigo.600");
  125. }
  126. @mixin purple-theme {
  127. --accent-color: theme("colors.purple.500");
  128. --accent-light-color: theme("colors.purple.400");
  129. --accent-dark-color: theme("colors.purple.600");
  130. --accent-contrast-color: theme("colors.white");
  131. --gradient-from-color: theme("colors.purple.200");
  132. --gradient-via-color: theme("colors.purple.400");
  133. --gradient-to-color: theme("colors.purple.600");
  134. }
  135. @mixin yellow-theme {
  136. --accent-color: theme("colors.yellow.500");
  137. --accent-light-color: theme("colors.yellow.400");
  138. --accent-dark-color: theme("colors.yellow.600");
  139. --accent-contrast-color: theme("colors.white");
  140. --gradient-from-color: theme("colors.yellow.200");
  141. --gradient-via-color: theme("colors.yellow.400");
  142. --gradient-to-color: theme("colors.yellow.600");
  143. }
  144. @mixin orange-theme {
  145. --accent-color: theme("colors.orange.500");
  146. --accent-light-color: theme("colors.orange.400");
  147. --accent-dark-color: theme("colors.orange.600");
  148. --accent-contrast-color: theme("colors.white");
  149. --gradient-from-color: theme("colors.orange.200");
  150. --gradient-via-color: theme("colors.orange.400");
  151. --gradient-to-color: theme("colors.orange.600");
  152. }
  153. @mixin red-theme {
  154. --accent-color: theme("colors.red.500");
  155. --accent-light-color: theme("colors.red.400");
  156. --accent-dark-color: theme("colors.red.600");
  157. --accent-contrast-color: theme("colors.white");
  158. --gradient-from-color: theme("colors.red.200");
  159. --gradient-via-color: theme("colors.red.400");
  160. --gradient-to-color: theme("colors.red.600");
  161. }
  162. @mixin pink-theme {
  163. --accent-color: theme("colors.pink.500");
  164. --accent-light-color: theme("colors.pink.400");
  165. --accent-dark-color: theme("colors.pink.600");
  166. --accent-contrast-color: theme("colors.white");
  167. --gradient-from-color: theme("colors.pink.200");
  168. --gradient-via-color: theme("colors.pink.400");
  169. --gradient-to-color: theme("colors.pink.600");
  170. }
  171. :root {
  172. @include base-theme;
  173. @include dark-theme;
  174. @include green-theme;
  175. @include dark-editor-theme;
  176. }
  177. :root.light {
  178. @include light-theme;
  179. @include light-editor-theme;
  180. }
  181. :root.dark {
  182. @include dark-theme;
  183. @include dark-editor-theme;
  184. }
  185. :root.black {
  186. @include black-theme;
  187. @include black-editor-theme;
  188. }
  189. :root[data-accent="blue"] {
  190. @include blue-theme;
  191. }
  192. :root[data-accent="green"] {
  193. @include green-theme;
  194. }
  195. :root[data-accent="teal"] {
  196. @include teal-theme;
  197. }
  198. :root[data-accent="indigo"] {
  199. @include indigo-theme;
  200. }
  201. :root[data-accent="purple"] {
  202. @include purple-theme;
  203. }
  204. :root[data-accent="orange"] {
  205. @include orange-theme;
  206. }
  207. :root[data-accent="pink"] {
  208. @include pink-theme;
  209. }
  210. :root[data-accent="red"] {
  211. @include red-theme;
  212. }
  213. :root[data-accent="yellow"] {
  214. @include yellow-theme;
  215. }
  216. @mixin font-small {
  217. --body-font-size: 0.75rem;
  218. --body-line-height: 1rem;
  219. --upper-primary-sticky-fold: 4.125rem;
  220. --upper-secondary-sticky-fold: 6.125rem;
  221. --upper-tertiary-sticky-fold: 8.188rem;
  222. --lower-primary-sticky-fold: 3rem;
  223. --lower-secondary-sticky-fold: 5rem;
  224. --sidebar-primary-sticky-fold: 2rem;
  225. --sidebar-secondary-sticky-fold: 4rem;
  226. }
  227. @mixin font-medium {
  228. --body-font-size: 0.875rem;
  229. --body-line-height: 1.25rem;
  230. --upper-primary-sticky-fold: 4.375rem;
  231. --upper-secondary-sticky-fold: 6.625rem;
  232. --upper-tertiary-sticky-fold: 8.813rem;
  233. --lower-primary-sticky-fold: 3.25rem;
  234. --lower-secondary-sticky-fold: 5.5rem;
  235. --sidebar-primary-sticky-fold: 2.25rem;
  236. --sidebar-secondary-sticky-fold: 4.5rem;
  237. }
  238. @mixin font-large {
  239. --body-font-size: 1rem;
  240. --body-line-height: 1.5rem;
  241. --upper-primary-sticky-fold: 4.625rem;
  242. --upper-secondary-sticky-fold: 7.125rem;
  243. --upper-tertiary-sticky-fold: 9.5rem;
  244. --lower-primary-sticky-fold: 3.5rem;
  245. --lower-secondary-sticky-fold: 6rem;
  246. --sidebar-primary-sticky-fold: 2.5rem;
  247. --sidebar-secondary-sticky-fold: 5rem;
  248. }
  249. :root[data-font-size="small"] {
  250. @include font-small;
  251. }
  252. :root[data-font-size="medium"] {
  253. @include font-medium;
  254. }
  255. :root[data-font-size="large"] {
  256. @include font-large;
  257. }