themes.scss 8.8 KB

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