themes.scss 9.9 KB

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