/** * portal-shell 全局样式(Tailwind v4 + shadcn 标准令牌) * * 引入 @edu/ui-tokens 三层设计令牌(primitive → semantic → tailwind-theme) * 业务代码使用 Tailwind 类(bg-background / text-foreground / bg-card ...)或 hsl(var(--*)) 引用。 * * 禁止规则(ESLint + project_rules §3.10): * - 禁止 #hex 字面量(用 hsl(var(--*)) 或 Tailwind bg-* 类) * - 禁止字体名字面量(用 var(--font-family-*)) * - 禁止 font-size: Npx(用 var(--font-size-*) 或 Tailwind text-* 类) * * 对齐:CICD 项目 src/app/globals.css */ @import "tailwindcss"; @import "@edu/ui-tokens/all.css"; @plugin "tailwindcss-animate"; @plugin "@tailwindcss/typography"; @custom-variant dark (&:where(.dark, .dark *)); /* 排除非源码目录,防止文档中的 Tailwind 任意值语法字符串被误识别为类名 */ @source not "../../docs"; @source not "../../scripts"; @source not "../../tests"; /* Reduced Motion */ @layer base { @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } } } /* Base Styles */ @layer base { * { @apply border-border; } body { @apply bg-background text-foreground; font-family: var(--font-family-sans); font-feature-settings: "rlig" 1, "calt" 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } h1, h2, h3, h4, h5, h6 { font-family: var(--font-family-sans); font-weight: var(--weight-semibold); letter-spacing: -0.01em; } }