feat(teacher-portal): 完整实现 teacher-portal 微前端
包含 settings/students/api、graphql、mocks、ui-tokens 设计令牌等
This commit is contained in:
112
packages/ui-tokens/src/primitive.css
Normal file
112
packages/ui-tokens/src/primitive.css
Normal file
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* Layer 1: Primitive Tokens(原始色板/字号/间距/阴影)
|
||||
*
|
||||
* 业务代码不直接引用本层令牌,仅 Layer 2 Semantic 引用。
|
||||
* 维护者:ai13(teacher-portal)
|
||||
* 关联:project_rules §3.10 设计令牌规范
|
||||
*
|
||||
* 命名规范:
|
||||
* - 颜色:--color-<hue>-<level>(HSL 分量,供 Layer 2 组合)
|
||||
* - 字号:--font-size-<n>(1-9 阶梯)
|
||||
* - 间距:--space-<n>(4px 基准阶梯)
|
||||
* - 阴影:--shadow-<n>
|
||||
* - 字重:--font-weight-<name>
|
||||
* - 圆角:--radius-<name>
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* ============ 颜色原始色板(HSL 分量,非完整颜色) ============ */
|
||||
/* 中性色(纸张/墨色) */
|
||||
--color-paper-h: 40;
|
||||
--color-paper-s: 20%;
|
||||
--color-paper-l-50: 50%;
|
||||
--color-paper-l-98: 98%;
|
||||
--color-paper-l-99: 99%;
|
||||
|
||||
--color-ink-h: 25;
|
||||
--color-ink-s: 3%;
|
||||
--color-ink-l-15: 15%;
|
||||
--color-ink-l-45: 45%;
|
||||
--color-ink-l-60: 60%;
|
||||
|
||||
/* 强调色(深蓝) */
|
||||
--color-accent-h: 220;
|
||||
--color-accent-s: 60%;
|
||||
--color-accent-l-35: 35%;
|
||||
--color-accent-l-50: 50%;
|
||||
|
||||
/* 分隔线(暖灰) */
|
||||
--color-rule-h: 30;
|
||||
--color-rule-s: 10%;
|
||||
--color-rule-l-85: 85%;
|
||||
--color-rule-l-90: 90%;
|
||||
|
||||
/* 语义原始色 */
|
||||
--color-success-h: 142;
|
||||
--color-success-s: 71%;
|
||||
--color-success-l-45: 45%;
|
||||
|
||||
--color-warning-h: 38;
|
||||
--color-warning-s: 92%;
|
||||
--color-warning-l-50: 50%;
|
||||
|
||||
--color-danger-h: 0;
|
||||
--color-danger-s: 84%;
|
||||
--color-danger-l-60: 60%;
|
||||
|
||||
--color-info-h: 199;
|
||||
--color-info-s: 89%;
|
||||
--color-info-l-48: 48%;
|
||||
|
||||
/* ============ 字号阶梯(1-9,1 最小 9 最大) ============ */
|
||||
--font-size-1: 0.75rem; /* 12px - 辅助说明 */
|
||||
--font-size-2: 0.875rem; /* 14px - 次要正文 */
|
||||
--font-size-3: 1rem; /* 16px - 正文 body */
|
||||
--font-size-4: 1.125rem; /* 18px - 强调正文 */
|
||||
--font-size-5: 1.25rem; /* 20px - 小标题 */
|
||||
--font-size-6: 1.5rem; /* 24px - 区块标题 */
|
||||
--font-size-7: 1.875rem; /* 30px - 页面标题 */
|
||||
--font-size-8: 2.25rem; /* 36px - Hero */
|
||||
--font-size-9: 3rem; /* 48px - 大数字 */
|
||||
|
||||
/* ============ 间距阶梯(4px 基准) ============ */
|
||||
--space-1: 0.25rem; /* 4px */
|
||||
--space-2: 0.5rem; /* 8px */
|
||||
--space-3: 0.75rem; /* 12px */
|
||||
--space-4: 1rem; /* 16px */
|
||||
--space-5: 1.25rem; /* 20px */
|
||||
--space-6: 1.5rem; /* 24px */
|
||||
--space-8: 2rem; /* 32px */
|
||||
--space-10: 2.5rem; /* 40px */
|
||||
--space-12: 3rem; /* 48px */
|
||||
--space-16: 4rem; /* 64px */
|
||||
--space-20: 5rem; /* 80px */
|
||||
|
||||
/* ============ 阴影 ============ */
|
||||
--shadow-1: 0 1px 2px 0 hsl(25 3% 15% / 0.05);
|
||||
--shadow-2: 0 1px 3px 0 hsl(25 3% 15% / 0.1), 0 1px 2px -1px hsl(25 3% 15% / 0.1);
|
||||
--shadow-3: 0 4px 6px -1px hsl(25 3% 15% / 0.1), 0 2px 4px -2px hsl(25 3% 15% / 0.1);
|
||||
--shadow-4: 0 10px 15px -3px hsl(25 3% 15% / 0.1), 0 4px 6px -4px hsl(25 3% 15% / 0.1);
|
||||
|
||||
/* ============ 字重 ============ */
|
||||
--font-weight-regular: 400;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-semibold: 600;
|
||||
--font-weight-bold: 700;
|
||||
|
||||
/* ============ 圆角 ============ */
|
||||
--radius-sm: 0.25rem; /* 4px */
|
||||
--radius-md: 0.375rem; /* 6px */
|
||||
--radius-lg: 0.5rem; /* 8px */
|
||||
--radius-full: 9999px;
|
||||
|
||||
/* ============ 行高 ============ */
|
||||
--line-height-tight: 1.25;
|
||||
--line-height-normal: 1.5;
|
||||
--line-height-relaxed: 1.75;
|
||||
|
||||
/* ============ 字间距 ============ */
|
||||
--letter-spacing-tight: -0.01em;
|
||||
--letter-spacing-normal: 0;
|
||||
--letter-spacing-wide: 0.025em;
|
||||
}
|
||||
Reference in New Issue
Block a user