@import "tailwindcss"; @plugin '../../hero.ts'; @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; @custom-variant dark (&:is(.dark *)); html, body { scrollbar-width: thin; scrollbar-color: #6b7280 transparent; } html::-webkit-scrollbar, body::-webkit-scrollbar { width: 6px; height: 6px; } html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: transparent; } html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background-color: #6b7280; border-radius: 9999px; } .dark html::-webkit-scrollbar-thumb, .dark body::-webkit-scrollbar-thumb { background-color: #d4d4d4; } /** * 移动端适配核心:clamp() 根字号 在390px设计稿下 16px ≈ 4.1025641vw = 1rem * 比如 390px设计稿,有一个div宽度是120px,那么可以写 w-30,下面是换算原理: * tailwindcss中单位用的是rem, 默认根字号为16px,也就是在tailwindcss中,0.25rem = 4px, * 而对于类名 w-1 来说,这里的1就是0.25rem,即4px,那么w-1就是4px,w-2就是8px,以此类推 * * */ html { font-size: clamp(10px, 4.1025641vw, 40px); } /* GLOBAL VARIABLES :root中定义常规变量,不被映射到工具类*/ :root { /* Font families */ font-family: var(--font-outfit), system-ui, sans-serif; --background: #ffffff; --foreground: #000; --color-selected-black: #00000099; --hero-background: #ffffff; --hero-foreground: #000; --dark-grey: #404040; --selected-color: #e3ecff; --selected-color-dark: #555b69; --selected-bottom-dark: #95b6ff; --selected-bg-bottom-dark: #314779; --input-color: #b3b3b3; /* 字体尺寸 */ --font-size-xxs: 13px; /* 间距变量(供自定义类使用) */ --space-30: 120px; --space-7_5: 30px; --space-92_5: 23.125rem; } /*theme中定义的变量可以被映射到实用程序类(需要注意映射规则,不是所有变量都能映射)*/ @theme { /* 仅保留字体族定义,其他通过 :root 变量注入 */ --font-family-outfit: var(--font-outfit), system-ui, sans-serif; /*自定义颜色*/ --color-ly-lightgray: #f2f2f2; --color-ly-gray: #d3d3d3; /*可被映射为text-ly-gray,bg-ly-gray等相关的颜色类目*/ --color-ly-gold: #ffd700; --color-ly-green: #01754a; --color-ly-middlegreen: #036141; --color-ly-deepgreen: #1e3932; /*自定义字体大小 前缀 ly*/ --text-ly-12: 0.75rem; --text-ly-14: 0.875rem; --text-ly-16: 1rem; --text-ly-18: 1.125rem; --text-ly-20: 1.25rem; --text-ly-22: 1.375rem; --text-ly-24: 1.5rem; --text-ly-30: 1.875rem; /* 1.875rem (30px) */ --text-ly-36: 2.25rem; /* 2.25rem (36px) */ --text-ly-48: 3rem; /* 3rem (48px) */ /*自定义行高 前缀 ly*/ --leading-ly-16: 1rem; --leading-ly-18: 1.125rem; --leading-ly-20: 1.25rem; --leading-ly-22: 1.375rem; --leading-ly-24: 1.5rem; --leading-ly-26: 1.625rem; --leading-ly-28: 1.75rem; --leading-ly-36: 2.25rem; } @utility h-ly-46 { height: 2.875rem; } @utility strokeline-bg-disabled { background-image:linear-gradient(to bottom right,transparent,transparent calc(50% - 1px),#acacac 50%,#acacac 0,transparent calc(50% + 1px)); } .dark { --background: #171717; --foreground: #ffffff; --hero-background: #171717; --hero-foreground: #ffffff; } @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-font-color: var(--font-color); --color-selected-black: var(--color-selected-black); --color-dark-grey: var(--dark-grey); --color-selected-color: var(--selected-color); --color-selected-color-dark: var(--selected-color-dark); --color-selected-bottom-dark: var(--selected-bottom-dark); --color-selected-bg-bottom-dark: var(--selected-bg-bottom-dark); --color-input-color: var(--input-color); } body { background: var(--background); color: var(--foreground); font-family: var(--font-outfit), system-ui, sans-serif; } @layer components { /* Hide scrollbar for drawer content */ .drawer-scrollbar-hidden { scrollbar-width: none; -ms-overflow-style: none; } .drawer-scrollbar-hidden::-webkit-scrollbar { display: none; } .placeholder-input-color::placeholder { color: var(--input-color); } .dark .placeholder-selected-color-dark::placeholder { color: var(--selected-color-dark); } .mobile-heading h2 { @apply sticky bg-white z-50 dark:bg-background top-0; } .prose h1 { margin: 12px 0 !important; font-family: Outfit, sans-serif !important; font-size: 24px !important; font-weight: 600 !important; } .prose p { color: var(--color-selected-black) !important; font-weight: 300 !important; } .dark .prose p { color: white !important; font-weight: 300 !important; } .margin-t { margin-top: -9px; } @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } .image-carousel-aspect { aspect-ratio: 1.72; } /* Prevent body scrolling when drawer is open */ .scroll-locked { overflow: hidden !important; height: 100vh !important; width: 100vw !important; position: fixed !important; top: 0; left: 0; touch-action: none; -webkit-overflow-scrolling: none; } }