themes.scss 9.7 KB

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