theme.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. import {createGlobalStyle} from 'styled-components';
  2. import theme from 'styled-theming';
  3. export default createGlobalStyle`
  4. :root {
  5. --body: ${theme('theme', {
  6. light: 'var(--body-light)',
  7. dark: 'var(--body-dark)',
  8. })};
  9. --widget: ${theme('theme', {
  10. light: 'var(--widget-light)',
  11. dark: 'var(--widget-dark)',
  12. })};
  13. --widget-grid-bg: ${theme('theme', {
  14. light: 'var(--widget-light)',
  15. dark: '#2f3035',
  16. })};
  17. --widget-shadow: ${theme('theme', {
  18. light: '0 1px 8px rgba(110, 110, 110, .1)',
  19. dark: '0 1px 8px rgba(18, 20, 20, .5)',
  20. })};
  21. --winget-inner-shadow: ${theme('theme', {
  22. light: 'linear-gradient(270deg, rgba(255, 255, 255, 0.0001) 0%, #FFFFFF 100%)',
  23. dark: 'linear-gradient(270deg, rgba(17, 19, 18, 0.0001) 0%, #111312 100%)',
  24. })};
  25. --text: ${theme('theme', {
  26. light: 'var(--text-light)',
  27. dark: 'var(--text-dark)',
  28. })};
  29. --border: ${theme('theme', {
  30. light: 'var(--border-light)',
  31. dark: 'var(--border-dark)',
  32. })};
  33. --header: ${theme('theme', {
  34. light: 'var(--header-light)',
  35. dark: 'var(--header-dark)',
  36. })};
  37. --header-invert: ${theme('theme', {
  38. light: 'var(--header-dark)',
  39. dark: 'var(--header-light)',
  40. })};
  41. --label: ${theme('theme', {
  42. light: 'var(--btn-text-light)',
  43. dark: 'var(--text-dark)',
  44. })};
  45. --btn-text: ${theme('theme', {
  46. light: 'var(--btn-text-light)',
  47. dark: 'var(--widget-light)',
  48. })};
  49. --highlight: ${theme('theme', {
  50. light: 'var(--olive)',
  51. dark: 'var(--accent)',
  52. })};
  53. --highlight-invert: ${theme('theme', {
  54. light: 'var(--accent)',
  55. dark: 'var(--olive)',
  56. })};
  57. --tooltip-bg: ${theme('theme', {
  58. light: 'var(--widget)',
  59. dark: 'var(--black-2)',
  60. })};
  61. --nav-arrow-color: ${theme('theme', {
  62. light: 'var(--header)',
  63. dark: '#8EA2AB',
  64. })};
  65. --nav-arrow-hover-color: ${theme('theme', {
  66. light: 'var(--blue)',
  67. dark: 'var(--accent)',
  68. })};
  69. --divider: ${theme('theme', {
  70. light: '#ccc',
  71. dark: '#25272C',
  72. })};
  73. --placeholder: ${theme('theme', {
  74. light: '#8C9876',
  75. dark: '#999999'
  76. })};
  77. --score-alt: ${theme('theme', {
  78. light: 'var(--border)',
  79. dark: 'var(--black-3)'
  80. })};
  81. --standard: ${theme('theme', {
  82. light: 'var(--standard-light)',
  83. dark: 'var(--standard-dark)'
  84. })};
  85. --nav-item-bg:${theme('theme', {
  86. light: '#f6f7fb',
  87. dark: '#191a1f'
  88. })};
  89. --nav-item-top:${theme('theme',{
  90. light:'#f6f7fc',
  91. dark:'#25262c'
  92. })};
  93. --nav-item-hover:${theme('theme',{
  94. light:'rgba(236,236,245,0.5)',
  95. dark:'rgba(69,70,80,0.5)'
  96. })};
  97. --widget-bg: ${theme('theme', {
  98. light: '#f6f7fb',
  99. dark: '#25262b',
  100. })};
  101. --swiper-btn-bg: ${theme('theme',{
  102. light:'#FFFFFF',
  103. dark:'#2a2b31',
  104. })};
  105. --card-bg: ${theme('theme', {
  106. light: '#FFFFFF',
  107. dark: '#2f3036',
  108. })};
  109. --card-bg-2: ${theme('theme', {
  110. light: 'rgba(130,130,130,0.3)',
  111. dark: '#31343c',
  112. })};
  113. --card-bg-3: ${theme('theme', {
  114. light: 'rgba(55,58,63,0.3)',
  115. dark: '#373a3f',
  116. })};
  117. --card-line: ${theme('theme', {
  118. light: 'rgba(0,0,0,.05)',
  119. dark: 'rgba(255,255,255,.05)',
  120. })};
  121. --pay-btn-bg: ${theme('theme', {
  122. light: '#FFFFFF',
  123. dark:'rgba(69,70,80,0.5)'
  124. })};
  125. --progressierElement: ${theme('theme', {
  126. light: '#fafafa !important',
  127. dark:'#29292e !important'
  128. })};
  129. --progressierBorderColor: ${theme('theme', {
  130. light: '#eaeaea !important',
  131. dark:'#313137 !important'
  132. })};
  133. --progressierHover: ${theme('theme', {
  134. light: '#f6f6f6 !important',
  135. dark:'#191a1e !important'
  136. })};
  137. --progressierBackdrop: ${theme('theme', {
  138. light: 'rgba(255, 255, 255, 0.90) !important',
  139. dark:'rgba(0, 0, 0, 0.90) !important'
  140. })};
  141. }
  142. `;