/** @type {import('tailwindcss').Config} */ // parent-portal Tailwind 配置 // 复用 teacher-portal 设计令牌(与 Shell 共享) // 依据:02-architecture-design.md §9 设计令牌三层(复用 packages/ui-tokens) // project_rules §3.10 设计令牌规范(禁止 #hex / 禁止硬编码字体 / 禁止任意值) module.exports = { content: ["./src/**/*.{js,ts,jsx,tsx}"], theme: { extend: { colors: { paper: "hsl(var(--paper))", ink: { DEFAULT: "hsl(var(--ink))", muted: "hsl(var(--ink-muted))", }, accent: { DEFAULT: "hsl(var(--accent))", soft: "hsl(var(--accent-soft))", }, rule: "hsl(var(--rule))", success: "hsl(var(--success))", warning: "hsl(var(--warning))", danger: "hsl(var(--danger))", }, fontFamily: { serif: ["var(--font-serif)"], sans: ["var(--font-sans)"], mono: ["var(--font-mono)"], }, fontSize: { xs: ["var(--font-size-1)", "var(--line-height-tight)"], sm: ["var(--font-size-2)", "var(--line-height-normal)"], base: ["var(--font-size-3)", "var(--line-height-normal)"], lg: ["var(--font-size-4)", "var(--line-height-normal)"], xl: ["var(--font-size-5)", "var(--line-height-tight)"], "2xl": ["var(--font-size-6)", "var(--line-height-tight)"], "3xl": ["var(--font-size-7)", "var(--line-height-tight)"], }, spacing: { 1: "var(--space-1)", 2: "var(--space-2)", 3: "var(--space-3)", 4: "var(--space-4)", 5: "var(--space-5)", 6: "var(--space-6)", 8: "var(--space-8)", 10: "var(--space-10)", 12: "var(--space-12)", 16: "var(--space-16)", }, borderRadius: { DEFAULT: "var(--radius-md)", sm: "var(--radius-sm)", md: "var(--radius-md)", lg: "var(--radius-lg)", full: "9999px", }, // 覆盖阴影值使用 rgba() 格式,避免 cssnano-simple 无法解析 rgb(0 0 0 / 0.1) 现代语法 boxShadow: { sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)", DEFAULT: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)", md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)", lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)", xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)", "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)", inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.05)", none: "none", }, }, }, // 禁用 ringWidth 核心插件(parent-portal 不使用 ring-* 类) // 原因:ringWidth 在 preflight 中生成 --tw-ring-color: rgb(59 130 246 / 0.5), // 旧版 cssnano-simple 无法解析此现代 CSS 语法导致构建失败 corePlugins: { ringWidth: false, }, plugins: [], };