themes.scss 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. @mixin font-small {
  176. --font-size-body: 0.75rem;
  177. --line-height-body: 1rem;
  178. --upper-primary-sticky-fold: 4.125rem;
  179. --upper-secondary-sticky-fold: 6.188rem;
  180. --upper-tertiary-sticky-fold: 8.25rem;
  181. --upper-mobile-primary-sticky-fold: 6.625rem;
  182. --upper-mobile-secondary-sticky-fold: 8.688rem;
  183. --upper-mobile-sticky-fold: 10.75rem;
  184. --upper-mobile-tertiary-sticky-fold: 8.25rem;
  185. --lower-primary-sticky-fold: 3rem;
  186. --lower-secondary-sticky-fold: 5.063rem;
  187. --lower-tertiary-sticky-fold: 7.125rem;
  188. --sidebar-primary-sticky-fold: 2rem;
  189. }
  190. @mixin font-medium {
  191. --font-size-body: 0.875rem;
  192. --line-height-body: 1.25rem;
  193. --upper-primary-sticky-fold: 4.375rem;
  194. --upper-secondary-sticky-fold: 6.688rem;
  195. --upper-tertiary-sticky-fold: 9rem;
  196. --upper-mobile-primary-sticky-fold: 7.125rem;
  197. --upper-mobile-secondary-sticky-fold: 9.438rem;
  198. --upper-mobile-sticky-fold: 11.75rem;
  199. --upper-mobile-tertiary-sticky-fold: 9rem;
  200. --lower-primary-sticky-fold: 3.25rem;
  201. --lower-secondary-sticky-fold: 5.563rem;
  202. --lower-tertiary-sticky-fold: 7.875rem;
  203. --sidebar-primary-sticky-fold: 2.25rem;
  204. }
  205. @mixin font-large {
  206. --font-size-body: 1rem;
  207. --line-height-body: 1.5rem;
  208. --upper-primary-sticky-fold: 4.625rem;
  209. --upper-secondary-sticky-fold: 7.188rem;
  210. --upper-tertiary-sticky-fold: 9.75rem;
  211. --upper-mobile-primary-sticky-fold: 7.625rem;
  212. --upper-mobile-secondary-sticky-fold: 10.188rem;
  213. --upper-mobile-sticky-fold: 12.75rem;
  214. --upper-mobile-tertiary-sticky-fold: 9.75rem;
  215. --lower-primary-sticky-fold: 3.5rem;
  216. --lower-secondary-sticky-fold: 6.063rem;
  217. --lower-tertiary-sticky-fold: 8.625rem;
  218. --sidebar-primary-sticky-fold: 2.5rem;
  219. }
  220. :root {
  221. @include base-theme;
  222. @include dark-theme;
  223. @include green-theme;
  224. @include dark-editor-theme;
  225. @include font-medium;
  226. }
  227. :root.light {
  228. @include light-theme;
  229. @include light-editor-theme;
  230. }
  231. :root.dark {
  232. @include dark-theme;
  233. @include dark-editor-theme;
  234. }
  235. :root.black {
  236. @include black-theme;
  237. @include black-editor-theme;
  238. }
  239. :root[data-accent='blue'] {
  240. @include blue-theme;
  241. }
  242. :root[data-accent='green'] {
  243. @include green-theme;
  244. }
  245. :root[data-accent='teal'] {
  246. @include teal-theme;
  247. }
  248. :root[data-accent='indigo'] {
  249. @include indigo-theme;
  250. }
  251. :root[data-accent='purple'] {
  252. @include purple-theme;
  253. }
  254. :root[data-accent='orange'] {
  255. @include orange-theme;
  256. }
  257. :root[data-accent='pink'] {
  258. @include pink-theme;
  259. }
  260. :root[data-accent='red'] {
  261. @include red-theme;
  262. }
  263. :root[data-accent='yellow'] {
  264. @include yellow-theme;
  265. }
  266. :root[data-font-size='small'] {
  267. @include font-small;
  268. }
  269. :root[data-font-size='medium'] {
  270. @include font-medium;
  271. }
  272. :root[data-font-size='large'] {
  273. @include font-large;
  274. }