globals.css 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. @import "tailwindcss";
  2. @plugin '../../hero.ts';
  3. @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
  4. @custom-variant dark (&:is(.dark *));
  5. html,
  6. body {
  7. scrollbar-width: thin;
  8. scrollbar-color: #6b7280 transparent;
  9. }
  10. html::-webkit-scrollbar,
  11. body::-webkit-scrollbar {
  12. width: 6px;
  13. height: 6px;
  14. }
  15. html::-webkit-scrollbar-track,
  16. body::-webkit-scrollbar-track {
  17. background: transparent;
  18. }
  19. html::-webkit-scrollbar-thumb,
  20. body::-webkit-scrollbar-thumb {
  21. background-color: #6b7280;
  22. border-radius: 9999px;
  23. }
  24. .dark html::-webkit-scrollbar-thumb,
  25. .dark body::-webkit-scrollbar-thumb {
  26. background-color: #d4d4d4;
  27. }
  28. /**
  29. * 移动端适配核心:clamp() 根字号 在390px设计稿下 16px ≈ 4.1025641vw = 1rem
  30. * 比如 390px设计稿,有一个div宽度是120px,那么可以写 w-30,下面是换算原理:
  31. * tailwindcss中单位用的是rem, 默认根字号为16px,也就是在tailwindcss中,0.25rem = 4px,
  32. * 而对于类名 w-1 来说,这里的1就是0.25rem,即4px,那么w-1就是4px,w-2就是8px,以此类推
  33. *
  34. * */
  35. html {
  36. font-size: clamp(10px, 4.1025641vw, 40px);
  37. }
  38. /* GLOBAL VARIABLES :root中定义常规变量,不被映射到工具类*/
  39. :root {
  40. /* Font families */
  41. font-family: var(--font-outfit-variable), system-ui, sans-serif;
  42. --background: #ffffff;
  43. --foreground: #000;
  44. --color-selected-black: #00000099;
  45. --hero-background: #ffffff;
  46. --hero-foreground: #000;
  47. --dark-grey: #404040;
  48. --selected-color: #e3ecff;
  49. --selected-color-dark: #555b69;
  50. --selected-bottom-dark: #95b6ff;
  51. --selected-bg-bottom-dark: #314779;
  52. --input-color: #b3b3b3;
  53. /* 字体尺寸 */
  54. --font-size-xxs: 13px;
  55. /* 间距变量(供自定义类使用) */
  56. --space-30: 120px;
  57. --space-7_5: 30px;
  58. --space-92_5: 23.125rem;
  59. }
  60. /*theme中定义的变量可以被映射到实用程序类(需要注意映射规则,不是所有变量都能映射)*/
  61. @theme {
  62. /*自定义颜色*/
  63. --color-ly-inputborder: #e5e5e5;
  64. --color-ly-placeholder: #A6A6A6;
  65. --color-ly-errorcolor: #FF0000;
  66. --color-ly-lightgray: #f9f9f9;
  67. --color-ly-middlegray: #f2f2f2;
  68. --color-ly-gray: #d3d3d3; /*可被映射为text-ly-gray,bg-ly-gray等相关的颜色类目*/
  69. --color-ly-deepgray: #ACACAC;
  70. --color-ly-gold: #ffd700;
  71. --color-ly-gold: #ffd700;
  72. --color-ly-green: #01754a;
  73. --color-ly-middlegreen: #036141;
  74. --color-ly-deepgreen: #1e3932;
  75. /*自定义字体大小 前缀 ly*/
  76. --text-ly-12: 0.75rem;
  77. --text-ly-13: 0.8125rem;
  78. --text-ly-14: 0.875rem;
  79. --text-ly-16: 1rem;
  80. --text-ly-18: 1.125rem;
  81. --text-ly-20: 1.25rem;
  82. --text-ly-22: 1.375rem;
  83. --text-ly-24: 1.5rem;
  84. --text-ly-30: 1.875rem; /* 1.875rem (30px) */
  85. --text-ly-36: 2.25rem; /* 2.25rem (36px) */
  86. --text-ly-48: 3rem; /* 3rem (48px) */
  87. /*自定义行高 前缀 ly*/
  88. --leading-ly-16: 1rem;
  89. --leading-ly-18: 1.125rem;
  90. --leading-ly-20: 1.25rem;
  91. --leading-ly-22: 1.375rem;
  92. --leading-ly-24: 1.5rem;
  93. --leading-ly-26: 1.625rem;
  94. --leading-ly-28: 1.75rem;
  95. --leading-ly-36: 2.25rem;
  96. }
  97. .dark {
  98. --background: #171717;
  99. --foreground: #ffffff;
  100. --hero-background: #171717;
  101. --hero-foreground: #ffffff;
  102. }
  103. /*@theme指令中的 inline 表示定义引用其他变量的主题变量
  104. 比如 定义了一个变量--color-background,--color-background引用的是另一个变量
  105. */
  106. @theme inline {
  107. --font-outfit: var(--font-outfit-variable), system-ui, sans-serif;
  108. --color-background: var(--background);
  109. --color-foreground: var(--foreground);
  110. --color-font-color: var(--font-color);
  111. --color-selected-black: var(--color-selected-black);
  112. --color-dark-grey: var(--dark-grey);
  113. --color-selected-color: var(--selected-color);
  114. --color-selected-color-dark: var(--selected-color-dark);
  115. --color-selected-bottom-dark: var(--selected-bottom-dark);
  116. --color-selected-bg-bottom-dark: var(--selected-bg-bottom-dark);
  117. --color-input-color: var(--input-color);
  118. }
  119. body {
  120. background: var(--background);
  121. color: var(--foreground);
  122. }
  123. @layer components {
  124. /* Hide scrollbar for drawer content */
  125. .drawer-scrollbar-hidden {
  126. scrollbar-width: none;
  127. -ms-overflow-style: none;
  128. }
  129. .drawer-scrollbar-hidden::-webkit-scrollbar {
  130. display: none;
  131. }
  132. .placeholder-input-color::placeholder {
  133. color: var(--input-color);
  134. }
  135. .dark .placeholder-selected-color-dark::placeholder {
  136. color: var(--selected-color-dark);
  137. }
  138. .mobile-heading h2 {
  139. @apply sticky bg-white z-50 dark:bg-background top-0;
  140. }
  141. .prose h1 {
  142. margin: 12px 0 !important;
  143. font-family: Outfit, sans-serif !important;
  144. font-size: 24px !important;
  145. font-weight: 600 !important;
  146. }
  147. .prose p {
  148. color: var(--color-selected-black) !important;
  149. font-weight: 300 !important;
  150. }
  151. .dark .prose p {
  152. color: white !important;
  153. font-weight: 300 !important;
  154. }
  155. .margin-t {
  156. margin-top: -9px;
  157. }
  158. @keyframes shimmer {
  159. 0% {
  160. transform: translateX(-100%);
  161. }
  162. 100% {
  163. transform: translateX(100%);
  164. }
  165. }
  166. .image-carousel-aspect {
  167. aspect-ratio: 1.72;
  168. }
  169. /* Prevent body scrolling when drawer is open */
  170. .scroll-locked {
  171. overflow: hidden !important;
  172. height: 100vh !important;
  173. width: 100vw !important;
  174. position: fixed !important;
  175. top: 0;
  176. left: 0;
  177. touch-action: none;
  178. -webkit-overflow-scrolling: none;
  179. }
  180. /*禁用按钮样式*/
  181. .strokeline-bg-disabled {
  182. background-image:linear-gradient(to bottom right,transparent,transparent calc(50% - 1px),#acacac 50%,#acacac 0,transparent calc(50% + 1px));
  183. }
  184. /*输入框样式*/
  185. .ly-input{
  186. @apply block w-full box-border text-ly-12 px-4 leading-4 border-1 border-ly-inputborder h-11.5 placeholder:text-ly-placeholder focus:outline-none
  187. }
  188. .fade-in{
  189. animation: fade-in 0.3s ease-in-out forwards;
  190. }
  191. .fade-out{
  192. animation: fade-out 0.3s ease-in-out forwards;
  193. }
  194. @keyframes fade-in{
  195. 0%{
  196. opacity: 0;
  197. }
  198. 100%{
  199. opacity: 1;
  200. }
  201. }
  202. @keyframes fade-out{
  203. 0%{
  204. opacity: 1;
  205. }
  206. 100%{
  207. opacity: 0;
  208. }
  209. }
  210. .slide-bottom-in{
  211. animation: slide-bottom-in 0.3s ease-in-out forwards;
  212. }
  213. .slide-bottom-out{
  214. animation: slide-bottom-out 0.3s ease-in-out forwards;
  215. }
  216. @keyframes slide-bottom-in{
  217. 0%{
  218. transform: translateY(100%);
  219. }
  220. 100%{
  221. transform: translateY(0);
  222. }
  223. }
  224. @keyframes slide-bottom-out{
  225. 0%{
  226. transform: translateY(0%);
  227. }
  228. 100%{
  229. transform: translateY(100%);
  230. }
  231. }
  232. .ly-thin-shadow{
  233. box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  234. }
  235. .ly-vipplus-bg{
  236. background: linear-gradient(128.05deg, rgba(250, 231, 200, 1) 0%, rgba(249, 255, 235, 1) 27.29%, rgba(242, 215, 172, 1) 64.42%, rgba(232, 202, 153, 1) 100%);
  237. }
  238. }
  239. apple-pay-button {
  240. --apple-pay-button-box-sizing: border-box;
  241. --apple-pay-button-width: 300px;
  242. --apple-pay-button-height: 48px;
  243. --apple-pay-button-border-radius: 24px;
  244. --apple-pay-button-padding: 6px 0px;
  245. display: block;
  246. width: 100%;
  247. }