AnyBot/skills/web-design/references/design-checklist.md

41 lines
1.4 KiB
Markdown
Raw Permalink 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.

# 網頁與互動介面交付前檢查清單
## CSS 設計變數起手式
```css
:root {
--bg: #f8fafc;
--surface: #ffffff;
--surface-muted: #f1f5f9;
--border: #e2e8f0;
--text: #0f172a;
--text-secondary: #475569;
--text-muted: #64748b;
--accent: #0f766e;
--accent-soft: #ccfbf1;
--radius: 12px;
--font-sans: "Inter", "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif;
--font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: var(--font-sans);
line-height: 1.65;
-webkit-font-smoothing: antialiased;
}
.num { font-variant-numeric: tabular-nums; }
```
## 逐項檢查清單
- [ ] **零假資料殘留**:沒有 `Lorem ipsum`、`TODO`、`example.com` 或按了沒反應的按鈕。
- [ ] **圖示一致**:使用 inline SVG,不使用破碎的外部圖片 URL。
- [ ] **對比度充足**:正文字色與背景對比達 WCAG AA(至少 `4.5:1`),深色模式下邊框清晰可見。
- [ ] **數字對齊**:金額、百分比、時間與表格數值加上 `font-variant-numeric: tabular-nums`。
- [ ] **手機版不爆版**:在 `375px` 寬度下沒有非預期的水平捲軸,按鈕點擊熱區高度至少 `40px`。
- [ ] **沙盒相容(若使用 `publish_site`)**:所有資源使用相對路徑(`./...`),不依賴跨站 Cookie。