themes.scss 8.7 KB

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