删除未使用前端设计 Token(07-16-second-stage-frontend-cleanup-wave1)
这个提交包含在:
@@ -36,6 +36,36 @@ and verification contracts. Do not copy broad aesthetic guidance from
|
||||
with `AUTH_005`.
|
||||
- Run `cd client && npm run typecheck && npm run build` for frontend changes.
|
||||
|
||||
## Convention: Frontend Design Token Sources
|
||||
|
||||
**What**: Runtime visual tokens use the sources that are actually consumed by
|
||||
the frontend build. CSS custom properties live in
|
||||
`client/src/design/theme.css`, which is imported by `client/src/index.css`;
|
||||
Tailwind theme values live in `client/tailwind.config.js`.
|
||||
|
||||
**Contracts**:
|
||||
|
||||
- Do not maintain a parallel TypeScript token object when no component, build
|
||||
plugin, generator or synchronization test consumes it.
|
||||
- Before adding, replacing or deleting a token source, search direct imports,
|
||||
type-only imports, `import.meta.glob`, generators, copy/sync scripts and
|
||||
build configuration.
|
||||
- Historical Issue CSV and archived Trellis references describe their original
|
||||
delivery state; they are not current runtime consumers and must not be
|
||||
rewritten merely because a source file is later removed.
|
||||
- If typed tokens become necessary later, introduce them with explicit runtime
|
||||
consumers or a generated single-source contract plus a drift regression
|
||||
test; do not manually duplicate CSS values.
|
||||
|
||||
**Why**: Unconsumed token mirrors drift from the CSS that actually renders the
|
||||
product, creating a misleading second fact source and unnecessary maintenance.
|
||||
|
||||
**Tests Required**:
|
||||
|
||||
- Exact consumer search for the changed token module or symbol.
|
||||
- `cd client && npm run typecheck`
|
||||
- `cd client && npm run build`
|
||||
|
||||
## Convention: Mature Enterprise Page Baseline
|
||||
|
||||
**What**: From `05-30-unified-page-design-review`, hyb-oa PC/mobile pages use
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
export const semanticTokens = {
|
||||
colors: {
|
||||
bgCanvas: "#f5f7f8",
|
||||
bgCanvasDeep: "#e8eef5",
|
||||
bgSurface: "#ffffff",
|
||||
bgSurfaceSubtle: "#f8fafc",
|
||||
bgSurfaceRaised: "rgba(255, 255, 255, 0.92)",
|
||||
bgPrimarySoft: "#e6ecf4",
|
||||
textPrimary: "#0f172a",
|
||||
textSecondary: "#475569",
|
||||
textTertiary: "#94a3b8",
|
||||
borderDefault: "#e2e8f0",
|
||||
borderStrong: "#cbd5e1",
|
||||
accentPrimary: "#00398a",
|
||||
accentPrimaryHover: "#002e6e",
|
||||
accentSecondary: "#13a8b8",
|
||||
accentInk: "#001f4d",
|
||||
success: "#067647",
|
||||
warning: "#b54708",
|
||||
danger: "#b42318",
|
||||
info: "#00398a",
|
||||
},
|
||||
radius: {
|
||||
sm: "0.5rem",
|
||||
md: "0.75rem",
|
||||
lg: "1rem",
|
||||
xl: "1.25rem",
|
||||
"2xl": "1.5rem",
|
||||
panel: "1.25rem",
|
||||
},
|
||||
shadow: {
|
||||
xs: "0 1px 2px rgba(15, 23, 42, 0.05)",
|
||||
sm: "0 8px 24px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.05)",
|
||||
md: "0 22px 55px rgba(0, 57, 138, 0.14)",
|
||||
focus: "0 0 0 4px rgba(0, 57, 138, 0.14)",
|
||||
},
|
||||
spacing: {
|
||||
pageX: "1.5rem",
|
||||
pageY: "1.5rem",
|
||||
cardX: "1.25rem",
|
||||
cardY: "1.25rem",
|
||||
sectionGap: "1.5rem",
|
||||
clusterGap: "1rem",
|
||||
},
|
||||
} as const;
|
||||
|
||||
export type SemanticTokens = typeof semanticTokens;
|
||||
在新工单中引用
屏蔽一个用户