themes.scss 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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-tiny: calc(var(--font-size-body) - 0.062rem);
  6. }
  7. @mixin dark-theme {
  8. --primary-color: theme('colors.dark.800');
  9. --primary-light-color: theme('colors.dark.600');
  10. --primary-dark-color: theme('colors.neutral.800');
  11. --primary-contrast-color: theme('colors.neutral.900');
  12. --secondary-color: theme('colors.neutral.400');
  13. --secondary-light-color: theme('colors.neutral.500');
  14. --secondary-dark-color: theme('colors.neutral.50');
  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.gray.50');
  26. --primary-dark-color: theme('colors.gray.100');
  27. --primary-contrast-color: theme('colors.light.50');
  28. --secondary-color: theme('colors.gray.500');
  29. --secondary-light-color: theme('colors.gray.400');
  30. --secondary-dark-color: theme('colors.gray.900');
  31. --divider-color: theme('colors.gray.100');
  32. --divider-light-color: theme('colors.gray.100');
  33. --divider-dark-color: theme('colors.gray.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: theme('colors.dark.900');
  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.dark.600');
  48. --divider-light-color: theme('colors.dark.800');
  49. --divider-dark-color: theme('colors.dark.200');
  50. --error-color: theme('colors.stone.900');
  51. --tooltip-color: theme('colors.neutral.100');
  52. --popover-color: theme('colors.dark.900');
  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. color-scheme: light;
  185. }
  186. :root.dark {
  187. @include dark-theme;
  188. @include dark-editor-theme;
  189. color-scheme: dark;
  190. }
  191. :root.black {
  192. @include black-theme;
  193. @include black-editor-theme;
  194. color-scheme: dark;
  195. }
  196. :root[data-accent='blue'] {
  197. @include blue-theme;
  198. }
  199. :root[data-accent='green'] {
  200. @include green-theme;
  201. }
  202. :root[data-accent='teal'] {
  203. @include teal-theme;
  204. }
  205. :root[data-accent='indigo'] {
  206. @include indigo-theme;
  207. }
  208. :root[data-accent='purple'] {
  209. @include purple-theme;
  210. }
  211. :root[data-accent='orange'] {
  212. @include orange-theme;
  213. }
  214. :root[data-accent='pink'] {
  215. @include pink-theme;
  216. }
  217. :root[data-accent='red'] {
  218. @include red-theme;
  219. }
  220. :root[data-accent='yellow'] {
  221. @include yellow-theme;
  222. }
  223. @mixin font-small {
  224. --font-size-body: 0.75rem;
  225. --line-height-body: 1rem;
  226. --upper-primary-sticky-fold: 4.125rem;
  227. --upper-secondary-sticky-fold: 6.188rem;
  228. --upper-tertiary-sticky-fold: 8.25rem;
  229. --upper-mobile-primary-sticky-fold: 6.625rem;
  230. --upper-mobile-secondary-sticky-fold: 8.688rem;
  231. --upper-mobile-sticky-fold: 10.75rem;
  232. --upper-mobile-tertiary-sticky-fold: 8.25rem;
  233. --lower-primary-sticky-fold: 3rem;
  234. --lower-secondary-sticky-fold: 5.063rem;
  235. --lower-tertiary-sticky-fold: 7.125rem;
  236. --sidebar-primary-sticky-fold: 2rem;
  237. }
  238. @mixin font-medium {
  239. --font-size-body: 0.875rem;
  240. --line-height-body: 1.25rem;
  241. --upper-primary-sticky-fold: 4.375rem;
  242. --upper-secondary-sticky-fold: 6.688rem;
  243. --upper-tertiary-sticky-fold: 9rem;
  244. --upper-mobile-primary-sticky-fold: 7.125rem;
  245. --upper-mobile-secondary-sticky-fold: 9.438rem;
  246. --upper-mobile-sticky-fold: 11.75rem;
  247. --upper-mobile-tertiary-sticky-fold: 9rem;
  248. --lower-primary-sticky-fold: 3.25rem;
  249. --lower-secondary-sticky-fold: 5.563rem;
  250. --lower-tertiary-sticky-fold: 7.875rem;
  251. --sidebar-primary-sticky-fold: 2.25rem;
  252. }
  253. @mixin font-large {
  254. --font-size-body: 1rem;
  255. --line-height-body: 1.5rem;
  256. --upper-primary-sticky-fold: 4.625rem;
  257. --upper-secondary-sticky-fold: 7.188rem;
  258. --upper-tertiary-sticky-fold: 9.75rem;
  259. --upper-mobile-primary-sticky-fold: 7.625rem;
  260. --upper-mobile-secondary-sticky-fold: 10.188rem;
  261. --upper-mobile-sticky-fold: 12.75rem;
  262. --upper-mobile-tertiary-sticky-fold: 9.75rem;
  263. --lower-primary-sticky-fold: 3.5rem;
  264. --lower-secondary-sticky-fold: 6.063rem;
  265. --lower-tertiary-sticky-fold: 8.625rem;
  266. --sidebar-primary-sticky-fold: 2.5rem;
  267. }
  268. :root[data-font-size='small'] {
  269. @include font-small;
  270. }
  271. :root[data-font-size='medium'] {
  272. @include font-medium;
  273. }
  274. :root[data-font-size='large'] {
  275. @include font-large;
  276. }