Files
Edu/apps/parent-portal/tailwind.config.js
SpecialX 96a936e154 feat(parent-portal): docker 构建修复 + 禁用 mock + 记录下游待办
Dockerfile 改用 standalone 模式

next.config.js 添加 output standalone

修复 cssnano-simple 构建失败:globals.css 注释含 */ 被误解析

tailwind.config.js 覆盖 boxShadow 为 rgba 格式 + 禁用 ringWidth

组件修复:替换 / 语法为 inline style 或自定义类

otel.ts 添加 webpackIgnore 跳过 optionalDependencies 静态分析

.env.example 默认禁用 mock

新增 .dockerignore 和 docs/nextstep.md

删除 postcss.config.js

验证:Docker 镜像构建成功,容器 healthy,typecheck + lint 零错误
2026-07-13 17:21:39 +08:00

80 lines
2.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/** @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: [],
};