global.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. @import 'tailwindcss';
  2. @import 'tw-animate-css';
  3. @plugin '@tailwindcss/typography';
  4. @plugin '@iconify/tailwind4';
  5. /* Monorepo source detection: scan all packages and apps for utility classes */
  6. @source '../../../../../../packages/';
  7. @source '../../../../../../apps/';
  8. @source '../../../../../../docs/';
  9. @source '../../../../../../playground/';
  10. /* Dark mode uses .dark class selector, not prefers-color-scheme */
  11. @custom-variant dark (&:is(.dark *));
  12. @theme inline {
  13. /* Font */
  14. --font-sans: var(--font-family);
  15. /* Border Radius */
  16. --radius-sm: calc(var(--radius) - 4px);
  17. --radius-md: calc(var(--radius) - 2px);
  18. --radius-lg: var(--radius);
  19. --radius-xl: calc(var(--radius) + 4px);
  20. /* Box Shadow */
  21. --shadow-float:
  22. 0 6px 16px 0 rgb(0 0 0 / 8%), 0 3px 6px -4px rgb(0 0 0 / 12%),
  23. 0 9px 28px 8px rgb(0 0 0 / 5%);
  24. /* Animations */
  25. --animate-accordion-down: accordion-down 0.2s ease-out;
  26. --animate-accordion-up: accordion-up 0.2s ease-out;
  27. --animate-collapsible-down: collapsible-down 0.2s ease-in-out;
  28. --animate-collapsible-up: collapsible-up 0.2s ease-in-out;
  29. --animate-float: float 5s linear 0ms infinite;
  30. /* ===== Semantic Colors (shadcn-ui) ===== */
  31. --color-background: hsl(var(--background));
  32. --color-background-deep: hsl(var(--background-deep));
  33. --color-foreground: hsl(var(--foreground));
  34. --color-card: hsl(var(--card));
  35. --color-card-foreground: hsl(var(--card-foreground));
  36. --color-popover: hsl(var(--popover));
  37. --color-popover-foreground: hsl(var(--popover-foreground));
  38. --color-muted: hsl(var(--muted));
  39. --color-muted-foreground: hsl(var(--muted-foreground));
  40. --color-accent: hsl(var(--accent));
  41. --color-accent-foreground: hsl(var(--accent-foreground));
  42. --color-accent-hover: hsl(var(--accent-hover));
  43. --color-accent-lighter: hsl(var(--accent-lighter));
  44. --color-border: hsl(var(--border));
  45. --color-input: hsl(var(--input));
  46. --color-input-background: hsl(var(--input-background));
  47. --color-ring: hsl(var(--ring));
  48. --color-secondary: hsl(var(--secondary));
  49. --color-secondary-desc: hsl(var(--secondary-desc));
  50. --color-secondary-foreground: hsl(var(--secondary-foreground));
  51. /* ===== Custom Semantic Colors ===== */
  52. --color-header: hsl(var(--header));
  53. --color-heavy: hsl(var(--heavy));
  54. --color-heavy-foreground: hsl(var(--heavy-foreground));
  55. --color-main: hsl(var(--main));
  56. --color-overlay: hsl(var(--overlay));
  57. --color-overlay-content: hsl(var(--overlay-content));
  58. --color-sidebar: hsl(var(--sidebar));
  59. --color-sidebar-deep: hsl(var(--sidebar-deep));
  60. /* ===== Primary Palette ===== */
  61. --color-primary: hsl(var(--primary));
  62. --color-primary-foreground: hsl(var(--primary-foreground));
  63. --color-primary-50: hsl(var(--primary-50));
  64. --color-primary-100: hsl(var(--primary-100));
  65. --color-primary-200: hsl(var(--primary-200));
  66. --color-primary-300: hsl(var(--primary-300));
  67. --color-primary-400: hsl(var(--primary-400));
  68. --color-primary-500: hsl(var(--primary-500));
  69. --color-primary-600: hsl(var(--primary-600));
  70. --color-primary-700: hsl(var(--primary-700));
  71. --color-primary-active: hsl(var(--primary-700));
  72. --color-primary-background-light: hsl(var(--primary-200));
  73. --color-primary-background-lighter: hsl(var(--primary-100));
  74. --color-primary-background-lightest: hsl(var(--primary-50));
  75. --color-primary-border: hsl(var(--primary-400));
  76. --color-primary-border-light: hsl(var(--primary-300));
  77. --color-primary-hover: hsl(var(--primary-600));
  78. --color-primary-text: hsl(var(--primary-500));
  79. --color-primary-text-active: hsl(var(--primary-700));
  80. --color-primary-text-hover: hsl(var(--primary-600));
  81. /* ===== Destructive Palette ===== */
  82. --color-destructive: hsl(var(--destructive));
  83. --color-destructive-foreground: hsl(var(--destructive-foreground));
  84. --color-destructive-50: hsl(var(--destructive-50));
  85. --color-destructive-100: hsl(var(--destructive-100));
  86. --color-destructive-200: hsl(var(--destructive-200));
  87. --color-destructive-300: hsl(var(--destructive-300));
  88. --color-destructive-400: hsl(var(--destructive-400));
  89. --color-destructive-500: hsl(var(--destructive-500));
  90. --color-destructive-600: hsl(var(--destructive-600));
  91. --color-destructive-700: hsl(var(--destructive-700));
  92. --color-destructive-active: hsl(var(--destructive-700));
  93. --color-destructive-background-light: hsl(var(--destructive-200));
  94. --color-destructive-background-lighter: hsl(var(--destructive-100));
  95. --color-destructive-background-lightest: hsl(var(--destructive-50));
  96. --color-destructive-border: hsl(var(--destructive-400));
  97. --color-destructive-border-light: hsl(var(--destructive-300));
  98. --color-destructive-hover: hsl(var(--destructive-600));
  99. --color-destructive-text: hsl(var(--destructive-500));
  100. --color-destructive-text-active: hsl(var(--destructive-700));
  101. --color-destructive-text-hover: hsl(var(--destructive-600));
  102. /* ===== Success Palette ===== */
  103. --color-success: hsl(var(--success));
  104. --color-success-foreground: hsl(var(--success-foreground));
  105. --color-success-50: hsl(var(--success-50));
  106. --color-success-100: hsl(var(--success-100));
  107. --color-success-200: hsl(var(--success-200));
  108. --color-success-300: hsl(var(--success-300));
  109. --color-success-400: hsl(var(--success-400));
  110. --color-success-500: hsl(var(--success-500));
  111. --color-success-600: hsl(var(--success-600));
  112. --color-success-700: hsl(var(--success-700));
  113. --color-success-active: hsl(var(--success-700));
  114. --color-success-background-light: hsl(var(--success-200));
  115. --color-success-background-lighter: hsl(var(--success-100));
  116. --color-success-background-lightest: hsl(var(--success-50));
  117. --color-success-border: hsl(var(--success-400));
  118. --color-success-border-light: hsl(var(--success-300));
  119. --color-success-hover: hsl(var(--success-600));
  120. --color-success-text: hsl(var(--success-500));
  121. --color-success-text-active: hsl(var(--success-700));
  122. --color-success-text-hover: hsl(var(--success-600));
  123. /* ===== Warning Palette ===== */
  124. --color-warning: hsl(var(--warning));
  125. --color-warning-foreground: hsl(var(--warning-foreground));
  126. --color-warning-50: hsl(var(--warning-50));
  127. --color-warning-100: hsl(var(--warning-100));
  128. --color-warning-200: hsl(var(--warning-200));
  129. --color-warning-300: hsl(var(--warning-300));
  130. --color-warning-400: hsl(var(--warning-400));
  131. --color-warning-500: hsl(var(--warning-500));
  132. --color-warning-600: hsl(var(--warning-600));
  133. --color-warning-700: hsl(var(--warning-700));
  134. --color-warning-active: hsl(var(--warning-700));
  135. --color-warning-background-light: hsl(var(--warning-200));
  136. --color-warning-background-lighter: hsl(var(--warning-100));
  137. --color-warning-background-lightest: hsl(var(--warning-50));
  138. --color-warning-border: hsl(var(--warning-400));
  139. --color-warning-border-light: hsl(var(--warning-300));
  140. --color-warning-hover: hsl(var(--warning-600));
  141. --color-warning-text: hsl(var(--warning-500));
  142. --color-warning-text-active: hsl(var(--warning-700));
  143. --color-warning-text-hover: hsl(var(--warning-600));
  144. /* ===== Green Palette (alias for success shades) ===== */
  145. --color-green-50: hsl(var(--green-50));
  146. --color-green-100: hsl(var(--green-100));
  147. --color-green-200: hsl(var(--green-200));
  148. --color-green-300: hsl(var(--green-300));
  149. --color-green-400: hsl(var(--green-400));
  150. --color-green-500: hsl(var(--green-500));
  151. --color-green-600: hsl(var(--green-600));
  152. --color-green-700: hsl(var(--green-700));
  153. --color-green-active: hsl(var(--green-700));
  154. --color-green-background-light: hsl(var(--green-200));
  155. --color-green-background-lighter: hsl(var(--green-100));
  156. --color-green-background-lightest: hsl(var(--green-50));
  157. --color-green-border: hsl(var(--green-400));
  158. --color-green-border-light: hsl(var(--green-300));
  159. --color-green-foreground: hsl(var(--success-foreground));
  160. --color-green-hover: hsl(var(--green-600));
  161. --color-green-text: hsl(var(--green-500));
  162. --color-green-text-active: hsl(var(--green-700));
  163. --color-green-text-hover: hsl(var(--green-600));
  164. /* ===== Red Palette (alias for destructive shades) ===== */
  165. --color-red-50: hsl(var(--red-50));
  166. --color-red-100: hsl(var(--red-100));
  167. --color-red-200: hsl(var(--red-200));
  168. --color-red-300: hsl(var(--red-300));
  169. --color-red-400: hsl(var(--red-400));
  170. --color-red-500: hsl(var(--red-500));
  171. --color-red-600: hsl(var(--red-600));
  172. --color-red-700: hsl(var(--red-700));
  173. --color-red-active: hsl(var(--red-700));
  174. --color-red-background-light: hsl(var(--red-200));
  175. --color-red-background-lighter: hsl(var(--red-100));
  176. --color-red-background-lightest: hsl(var(--red-50));
  177. --color-red-border: hsl(var(--red-400));
  178. --color-red-border-light: hsl(var(--red-300));
  179. --color-red-foreground: hsl(var(--destructive-foreground));
  180. --color-red-hover: hsl(var(--red-600));
  181. --color-red-text: hsl(var(--red-500));
  182. --color-red-text-active: hsl(var(--red-700));
  183. --color-red-text-hover: hsl(var(--red-600));
  184. /* ===== Yellow Palette (alias for warning shades) ===== */
  185. --color-yellow-50: hsl(var(--yellow-50));
  186. --color-yellow-100: hsl(var(--yellow-100));
  187. --color-yellow-200: hsl(var(--yellow-200));
  188. --color-yellow-300: hsl(var(--yellow-300));
  189. --color-yellow-400: hsl(var(--yellow-400));
  190. --color-yellow-500: hsl(var(--yellow-500));
  191. --color-yellow-600: hsl(var(--yellow-600));
  192. --color-yellow-700: hsl(var(--yellow-700));
  193. --color-yellow-active: hsl(var(--yellow-700));
  194. --color-yellow-background-light: hsl(var(--yellow-200));
  195. --color-yellow-background-lighter: hsl(var(--yellow-100));
  196. --color-yellow-background-lightest: hsl(var(--yellow-50));
  197. --color-yellow-border: hsl(var(--yellow-400));
  198. --color-yellow-border-light: hsl(var(--yellow-300));
  199. --color-yellow-foreground: hsl(var(--warning-foreground));
  200. --color-yellow-hover: hsl(var(--yellow-600));
  201. --color-yellow-text: hsl(var(--yellow-500));
  202. --color-yellow-text-active: hsl(var(--yellow-700));
  203. --color-yellow-text-hover: hsl(var(--yellow-600));
  204. }
  205. /* Keyframes */
  206. @keyframes accordion-down {
  207. from {
  208. height: 0;
  209. }
  210. to {
  211. height: var(--reka-accordion-content-height);
  212. }
  213. }
  214. @keyframes accordion-up {
  215. from {
  216. height: var(--reka-accordion-content-height);
  217. }
  218. to {
  219. height: 0;
  220. }
  221. }
  222. @keyframes collapsible-down {
  223. from {
  224. height: 0;
  225. }
  226. to {
  227. height: var(--reka-collapsible-content-height);
  228. }
  229. }
  230. @keyframes collapsible-up {
  231. from {
  232. height: var(--reka-collapsible-content-height);
  233. }
  234. to {
  235. height: 0;
  236. }
  237. }
  238. @keyframes float {
  239. 0% {
  240. transform: translateY(0);
  241. }
  242. 50% {
  243. transform: translateY(-20px);
  244. }
  245. 100% {
  246. transform: translateY(0);
  247. }
  248. }
  249. /* Base styles */
  250. @layer base {
  251. *,
  252. ::after,
  253. ::before {
  254. @apply border-border outline-ring/50;
  255. box-sizing: border-box;
  256. border-style: solid;
  257. border-width: 0;
  258. }
  259. html {
  260. @apply text-foreground bg-background font-sans;
  261. scroll-behavior: smooth;
  262. font-size: var(--font-size-base, 16px);
  263. font-variation-settings: normal;
  264. font-synthesis-weight: none;
  265. line-height: 1.15;
  266. text-rendering: optimizelegibility;
  267. text-size-adjust: 100%;
  268. -webkit-tap-highlight-color: transparent;
  269. }
  270. #app,
  271. body,
  272. html {
  273. @apply size-full;
  274. }
  275. body {
  276. min-height: 100vh;
  277. }
  278. a,
  279. a:active,
  280. a:hover,
  281. a:link,
  282. a:visited {
  283. @apply no-underline;
  284. }
  285. ::view-transition-new(root),
  286. ::view-transition-old(root) {
  287. @apply animate-none mix-blend-normal;
  288. }
  289. ::view-transition-old(root) {
  290. @apply z-1;
  291. }
  292. ::view-transition-new(root) {
  293. @apply z-2147483646;
  294. }
  295. html.dark::view-transition-old(root) {
  296. @apply z-2147483646;
  297. }
  298. html.dark::view-transition-new(root) {
  299. @apply z-1;
  300. }
  301. input::placeholder,
  302. textarea::placeholder {
  303. @apply opacity-100;
  304. }
  305. input[type='number']::-webkit-inner-spin-button,
  306. input[type='number']::-webkit-outer-spin-button {
  307. @apply m-0 appearance-none;
  308. }
  309. /* Only adjust scrollbar for non-macOS */
  310. html:not([data-platform='macOs']) {
  311. ::-webkit-scrollbar {
  312. @apply h-2.5 w-2.5;
  313. }
  314. ::-webkit-scrollbar-thumb {
  315. @apply bg-border rounded-sm border-none;
  316. }
  317. ::-webkit-scrollbar-track {
  318. @apply rounded-sm border-none bg-transparent shadow-none;
  319. }
  320. ::-webkit-scrollbar-button {
  321. @apply hidden;
  322. }
  323. }
  324. }
  325. /* Custom utilities (v4 @utility syntax) */
  326. @utility flex-center {
  327. display: flex;
  328. align-items: center;
  329. justify-content: center;
  330. }
  331. @utility flex-col-center {
  332. display: flex;
  333. flex-direction: column;
  334. align-items: center;
  335. justify-content: center;
  336. }
  337. /* Component styles (complex selectors, not convertible to @utility) */
  338. .outline-box {
  339. @apply outline-border relative cursor-pointer rounded-md p-1 outline-1;
  340. }
  341. .outline-box::after {
  342. @apply absolute top-1/2 left-1/2 z-20 h-0 w-px rounded-sm opacity-0 outline-2 outline-transparent transition-all duration-300 content-[""];
  343. }
  344. .outline-box.outline-box-active {
  345. @apply outline-primary outline-2;
  346. }
  347. .outline-box.outline-box-active::after {
  348. display: none;
  349. }
  350. .outline-box:not(.outline-box-active):hover::after {
  351. @apply outline-primary top-0 left-0 h-full w-full p-1 opacity-100;
  352. }
  353. .vben-link {
  354. @apply text-primary hover:text-primary-hover active:text-primary-active cursor-pointer;
  355. }
  356. .card-box {
  357. @apply bg-card text-card-foreground border-border rounded-xl border;
  358. }
  359. /* Enter animations (converted from enterAnimationPlugin) */
  360. @keyframes enter-x-animation {
  361. to {
  362. opacity: 1;
  363. transform: translateX(0);
  364. }
  365. }
  366. @keyframes enter-y-animation {
  367. to {
  368. opacity: 1;
  369. transform: translateY(0);
  370. }
  371. }
  372. .enter-x:nth-child(1) {
  373. opacity: 0;
  374. transform: translateX(50px);
  375. animation: enter-x-animation 0.3s ease-in-out 0.1s forwards;
  376. }
  377. .enter-x:nth-child(2) {
  378. opacity: 0;
  379. transform: translateX(50px);
  380. animation: enter-x-animation 0.3s ease-in-out 0.2s forwards;
  381. }
  382. .enter-x:nth-child(3) {
  383. opacity: 0;
  384. transform: translateX(50px);
  385. animation: enter-x-animation 0.3s ease-in-out 0.3s forwards;
  386. }
  387. .enter-x:nth-child(4) {
  388. opacity: 0;
  389. transform: translateX(50px);
  390. animation: enter-x-animation 0.3s ease-in-out 0.4s forwards;
  391. }
  392. .enter-x:nth-child(5) {
  393. opacity: 0;
  394. transform: translateX(50px);
  395. animation: enter-x-animation 0.3s ease-in-out 0.5s forwards;
  396. }
  397. .enter-y:nth-child(1) {
  398. opacity: 0;
  399. transform: translateY(50px);
  400. animation: enter-y-animation 0.3s ease-in-out 0.1s forwards;
  401. }
  402. .enter-y:nth-child(2) {
  403. opacity: 0;
  404. transform: translateY(50px);
  405. animation: enter-y-animation 0.3s ease-in-out 0.2s forwards;
  406. }
  407. .enter-y:nth-child(3) {
  408. opacity: 0;
  409. transform: translateY(50px);
  410. animation: enter-y-animation 0.3s ease-in-out 0.3s forwards;
  411. }
  412. .enter-y:nth-child(4) {
  413. opacity: 0;
  414. transform: translateY(50px);
  415. animation: enter-y-animation 0.3s ease-in-out 0.4s forwards;
  416. }
  417. .enter-y:nth-child(5) {
  418. opacity: 0;
  419. transform: translateY(50px);
  420. animation: enter-y-animation 0.3s ease-in-out 0.5s forwards;
  421. }
  422. .-enter-x:nth-child(1) {
  423. opacity: 0;
  424. transform: translateX(-50px);
  425. animation: enter-x-animation 0.3s ease-in-out 0.1s forwards;
  426. }
  427. .-enter-x:nth-child(2) {
  428. opacity: 0;
  429. transform: translateX(-50px);
  430. animation: enter-x-animation 0.3s ease-in-out 0.2s forwards;
  431. }
  432. .-enter-x:nth-child(3) {
  433. opacity: 0;
  434. transform: translateX(-50px);
  435. animation: enter-x-animation 0.3s ease-in-out 0.3s forwards;
  436. }
  437. .-enter-x:nth-child(4) {
  438. opacity: 0;
  439. transform: translateX(-50px);
  440. animation: enter-x-animation 0.3s ease-in-out 0.4s forwards;
  441. }
  442. .-enter-x:nth-child(5) {
  443. opacity: 0;
  444. transform: translateX(-50px);
  445. animation: enter-x-animation 0.3s ease-in-out 0.5s forwards;
  446. }
  447. .-enter-y:nth-child(1) {
  448. opacity: 0;
  449. transform: translateY(-50px);
  450. animation: enter-y-animation 0.3s ease-in-out 0.1s forwards;
  451. }
  452. .-enter-y:nth-child(2) {
  453. opacity: 0;
  454. transform: translateY(-50px);
  455. animation: enter-y-animation 0.3s ease-in-out 0.2s forwards;
  456. }
  457. .-enter-y:nth-child(3) {
  458. opacity: 0;
  459. transform: translateY(-50px);
  460. animation: enter-y-animation 0.3s ease-in-out 0.3s forwards;
  461. }
  462. .-enter-y:nth-child(4) {
  463. opacity: 0;
  464. transform: translateY(-50px);
  465. animation: enter-y-animation 0.3s ease-in-out 0.4s forwards;
  466. }
  467. .-enter-y:nth-child(5) {
  468. opacity: 0;
  469. transform: translateY(-50px);
  470. animation: enter-y-animation 0.3s ease-in-out 0.5s forwards;
  471. }
  472. html.invert-mode {
  473. @apply invert;
  474. }
  475. html.grayscale-mode {
  476. @apply grayscale;
  477. }