agentcss 0.25.2 → 0.25.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/01-tokens/tokens.css +1 -1
- package/API.md +13 -5
- package/CHANGELOG.md +199 -0
- package/CONTRIBUTING.md +5 -5
- package/README.zh-CN.md +3 -3
- package/ai/cli.js +5 -1
- package/ai/components.json +1 -1
- package/ai/tokens.json +100 -99
- package/ai/tokens.schema.json +96 -50
- package/dist/COSTS.md +7 -7
- package/docs/ACCESSIBILITY.md +1 -1
- package/docs/GUIDANCE.md +82 -0
- package/docs/LESSONS.md +182 -0
- package/index.html +1 -1
- package/llms-full.txt +1 -1
- package/package.json +4 -2
- package/types/index.d.ts +126 -2
package/ai/tokens.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"--paper": {
|
|
8
8
|
"$value": "#f6f7f8",
|
|
9
9
|
"$type": "color",
|
|
10
|
-
"$description": "
|
|
10
|
+
"$description": "paper = 页面底(冷灰白)。🔴 不能更浅:与 --surface 的对比度要 >= 1.06:1, 否则页面看着就是纯白,\"表面浮在底上\"的分层完全消失。 surface= 卡片/面板底,比纸底亮一档,靠明度差而非描边来分层"
|
|
11
11
|
},
|
|
12
12
|
"--surface": {
|
|
13
13
|
"$value": "#ffffff",
|
|
@@ -20,131 +20,131 @@
|
|
|
20
20
|
"--surface-raised": {
|
|
21
21
|
"$value": "#ffffff",
|
|
22
22
|
"$type": "color",
|
|
23
|
-
"$description": "🔴 浮层底(下拉/气泡/抽屉面板)。"
|
|
23
|
+
"$description": "🔴 浮层底(下拉/气泡/抽屉面板)。 这条**原本只在暗色段定义** ⇒ 浅色下 6 个组件(combobox/popover/select/ dropdown/tooltip/table)的 `background` 整条失效 ⇒ 实测**完全透明**。 浅色值 = --surface:浅色抬高靠阴影(--shadow-*),暗色才靠\"面更亮\"。"
|
|
24
24
|
},
|
|
25
25
|
"--scrollbar-size": {
|
|
26
26
|
"$value": "10px",
|
|
27
27
|
"$type": "dimension",
|
|
28
|
-
"$description": "
|
|
28
|
+
"$description": "桌面宽度;移动端由浏览器接管"
|
|
29
29
|
},
|
|
30
30
|
"--scrollbar-size-thin": {
|
|
31
31
|
"$value": "6px",
|
|
32
32
|
"$type": "dimension",
|
|
33
|
-
"$description": "
|
|
33
|
+
"$description": "代码块等次要场景"
|
|
34
34
|
},
|
|
35
35
|
"--scrollbar-thumb": {
|
|
36
36
|
"$value": "#7A808A",
|
|
37
37
|
"$type": "color",
|
|
38
|
-
"$description": "🔴 色值是**脚本反解**出来的(WCAG 1.4.11 要求 thumb 对 track ≥3:1),"
|
|
38
|
+
"$description": "🔴 色值是**脚本反解**出来的(WCAG 1.4.11 要求 thumb 对 track ≥3:1), 不是\"看着差不多\"挑的: #7a808a 对 #ffffff 3.98:1 · 对 #f6f7f8 3.71:1 ✅ ⚠️ 第一版我随手挑的 #B4BAC4 只有 1.82:1 ⇒ 门禁直接判不合格。 中性**冷**灰(非品牌色,且保持蓝调)"
|
|
39
39
|
},
|
|
40
40
|
"--scrollbar-thumb-hov": {
|
|
41
41
|
"$value": "#6E747E",
|
|
42
42
|
"$type": "color",
|
|
43
|
-
"$description": "
|
|
43
|
+
"$description": "hover 更深一档 · 4.06:1"
|
|
44
44
|
},
|
|
45
45
|
"--scrollbar-radius": {
|
|
46
46
|
"$value": "5px",
|
|
47
47
|
"$type": "dimension",
|
|
48
|
-
"$description": "
|
|
48
|
+
"$description": "= size/2 ⇒ 胶囊形"
|
|
49
49
|
},
|
|
50
50
|
"--text-primary": {
|
|
51
51
|
"$value": "#15181c",
|
|
52
52
|
"$type": "color",
|
|
53
|
-
"$description": "
|
|
53
|
+
"$description": "16.60 纸底 / 17.81 表面 · AAA"
|
|
54
54
|
},
|
|
55
55
|
"--text-secondary": {
|
|
56
56
|
"$value": "#4f555e",
|
|
57
57
|
"$type": "color",
|
|
58
|
-
"$description": "
|
|
58
|
+
"$description": "7.01 AAA"
|
|
59
59
|
},
|
|
60
60
|
"--text-tertiary": {
|
|
61
61
|
"$value": "#606770",
|
|
62
62
|
"$type": "color",
|
|
63
|
-
"$description": "🔴 由 #6b7280 调深到 #606770。"
|
|
63
|
+
"$description": "🔴 由 #6b7280 调深到 #606770。 axe-core 实测发现:#6b7280 压在**语义底色**上只有 4.13:1 (4.5 是正文门槛)—— 它只在白底上勉强过线(4.83), 一放到 --surface-sunken / --warning-bg 等底上就不达标。 调深后最低 4.89(压在最亮的 --surface 上),留了 0.39 余量。 梯度仍在:primary 17.8 / secondary 7.5 / tertiary 4.9 —— 明显分层。 5.33 纸底 / 4.89 最亮底(surface) · AA 4.51 AA"
|
|
64
64
|
},
|
|
65
65
|
"--text-on-accent": {
|
|
66
66
|
"$value": "#ffffff",
|
|
67
67
|
"$type": "color",
|
|
68
|
-
"$description": "
|
|
68
|
+
"$description": "8.38 压在 accent 上(不是压纸底)· AAA"
|
|
69
69
|
},
|
|
70
70
|
"--text-on-solid": {
|
|
71
71
|
"$value": "#ffffff",
|
|
72
72
|
"$type": "color",
|
|
73
|
-
"$description": "🔴 新增( H9 期间由暗色门禁逼出来):"
|
|
73
|
+
"$description": "🔴 新增( H9 期间由暗色门禁逼出来): 「实心态」组件(filled badge 等)压在**语义色实底**上的文字色。 ⚠️ 为什么不能复用 --text-on-accent: 暗色下 --success / --danger / --warning 都**变浅**了(为在深底上更醒目), 实心态的底色也随之变浅 ⇒ 白字压上去只有 2.72:1。 ⇒ 需要一个**独立令牌**,让暗色能把它换成深字。 亮色:实底(深色语义色)⇒ 白字"
|
|
74
74
|
},
|
|
75
75
|
"--skeleton-bg": {
|
|
76
76
|
"$value": "#e9ecef",
|
|
77
77
|
"$type": "color",
|
|
78
|
-
"$description": "
|
|
78
|
+
"$description": "骨架底色:比纸面略深一档"
|
|
79
79
|
},
|
|
80
80
|
"--skeleton-shimmer": {
|
|
81
81
|
"$value": "rgba(255, 255, 255, 0.72)",
|
|
82
82
|
"$type": "color",
|
|
83
|
-
"$description": "
|
|
83
|
+
"$description": "微光高光"
|
|
84
84
|
},
|
|
85
85
|
"--skeleton-h": {
|
|
86
86
|
"$value": "1em",
|
|
87
87
|
"$type": "dimension",
|
|
88
|
-
"$description": "
|
|
88
|
+
"$description": "单行默认高度"
|
|
89
89
|
},
|
|
90
90
|
"--skeleton-size": {
|
|
91
91
|
"$value": "40px",
|
|
92
92
|
"$type": "dimension",
|
|
93
|
-
"$description": "
|
|
93
|
+
"$description": "circle 默认直径"
|
|
94
94
|
},
|
|
95
95
|
"--skeleton-duration": {
|
|
96
96
|
"$value": "1.4s",
|
|
97
97
|
"$type": "duration",
|
|
98
|
-
"$description": "
|
|
98
|
+
"$description": "微光扫过周期"
|
|
99
99
|
},
|
|
100
100
|
"--ease-out": {
|
|
101
101
|
"$value": "cubic-bezier(0.23, 1, 0.32, 1)",
|
|
102
102
|
"$type": "cubicBezier",
|
|
103
|
-
"$description": "
|
|
103
|
+
"$description": "🔴 新增( I5)。组件私有参数集中在这里定义, 而不是散在 CSS 里用 fallback —— 否则 deps 门禁会报\"未定义令牌\"。 ⭐ --ease-out 刻意独立命名:进度条要\"向前\"的 feel, 匀速(linear)反而像卡住了。"
|
|
104
104
|
},
|
|
105
105
|
"--progress-h": {
|
|
106
106
|
"$value": "6px",
|
|
107
|
-
"$type": "dimension"
|
|
107
|
+
"$type": "dimension",
|
|
108
|
+
"$description": "线形默认高度"
|
|
108
109
|
},
|
|
109
110
|
"--progress-dur": {
|
|
110
111
|
"$value": "240ms",
|
|
111
112
|
"$type": "duration",
|
|
112
|
-
"$description": "
|
|
113
|
+
"$description": "宽度过渡时长"
|
|
113
114
|
},
|
|
114
115
|
"--r-full": {
|
|
115
116
|
"$value": "999px",
|
|
116
117
|
"$type": "dimension",
|
|
117
|
-
"$description": "
|
|
118
|
+
"$description": "胶囊形圆角"
|
|
118
119
|
},
|
|
119
120
|
"--ring-size": {
|
|
120
121
|
"$value": "64px",
|
|
121
122
|
"$type": "dimension",
|
|
122
|
-
"$description": "
|
|
123
|
+
"$description": "环形默认直径"
|
|
123
124
|
},
|
|
124
125
|
"--ring-thickness": {
|
|
125
126
|
"$value": "8px",
|
|
126
127
|
"$type": "dimension",
|
|
127
|
-
"$description": "
|
|
128
|
+
"$description": "环形环宽"
|
|
128
129
|
},
|
|
129
130
|
"--progress": {
|
|
130
131
|
"$value": "0%",
|
|
131
132
|
"$type": "dimension",
|
|
132
|
-
"$description": "进度条的当前值。默认 0% 是**正确默认**(不是占位)——"
|
|
133
|
+
"$description": "进度条的当前值。默认 0% 是**正确默认**(不是占位)—— 实例用 JS setProperty 覆盖它(见 progress demo)。 ⚠️ 必须有默认值,否则\"忘了设值\"会渲染成 0% 且**没人发现**。"
|
|
133
134
|
},
|
|
134
135
|
"--progress-num": {
|
|
135
136
|
"$value": "0",
|
|
136
137
|
"$type": "number",
|
|
137
|
-
"$description": "环形用**无单位**数值(conic-gradient 的角度计算不接受带 % 的长度)。"
|
|
138
|
+
"$description": "环形用**无单位**数值(conic-gradient 的角度计算不接受带 % 的长度)。 ⚠️ 这就是环形曾完全不显示的原因,别再改成 --progress。"
|
|
138
139
|
},
|
|
139
140
|
"--z-popover": {
|
|
140
141
|
"$value": "60",
|
|
141
142
|
"$type": "number",
|
|
142
|
-
"$description": "
|
|
143
|
+
"$description": "层级:高于导航,低于 dialog"
|
|
143
144
|
},
|
|
144
145
|
"--popover-min-w": {
|
|
145
146
|
"$value": "200px",
|
|
146
|
-
"$type": "dimension"
|
|
147
|
-
"$description": "层级:高于导航,低于 dialog"
|
|
147
|
+
"$type": "dimension"
|
|
148
148
|
},
|
|
149
149
|
"--popover-max-w": {
|
|
150
150
|
"$value": "320px",
|
|
@@ -156,56 +156,57 @@
|
|
|
156
156
|
},
|
|
157
157
|
"--popover-gap": {
|
|
158
158
|
"$value": "8px",
|
|
159
|
-
"$type": "dimension"
|
|
159
|
+
"$type": "dimension",
|
|
160
|
+
"$description": "浮层与触发器的距离"
|
|
160
161
|
},
|
|
161
162
|
"--popover-dur": {
|
|
162
163
|
"$value": "140ms",
|
|
163
|
-
"$type": "duration"
|
|
164
|
-
"$description": "浮层与触发器的距离"
|
|
164
|
+
"$type": "duration"
|
|
165
165
|
},
|
|
166
166
|
"--border-control": {
|
|
167
167
|
"$value": "#868b94",
|
|
168
168
|
"$type": "color",
|
|
169
|
-
"$description": "
|
|
169
|
+
"$description": "3.19 / 3.42 AA Large"
|
|
170
170
|
},
|
|
171
171
|
"--border-decor": {
|
|
172
172
|
"$value": "#e2e5e9",
|
|
173
173
|
"$type": "color",
|
|
174
|
-
"$description": "
|
|
174
|
+
"$description": "1.18 纯装饰,WCAG 不强制"
|
|
175
175
|
},
|
|
176
176
|
"--border-decor-str": {
|
|
177
177
|
"$value": "#c8cdd4",
|
|
178
178
|
"$type": "color",
|
|
179
|
-
"$description": "1.
|
|
179
|
+
"$description": "1.49 装饰,需要更强分隔时用"
|
|
180
180
|
},
|
|
181
181
|
"--danger": {
|
|
182
182
|
"$value": "#c0392b",
|
|
183
183
|
"$type": "color",
|
|
184
|
-
"$description": "
|
|
184
|
+
"$description": "全部实测 >= 5.6 AA(vs 纸底)。可当文字用,也可当底色用。"
|
|
185
185
|
},
|
|
186
186
|
"--danger-hover": {
|
|
187
187
|
"$value": "#8f1e17",
|
|
188
|
-
"$type": "color"
|
|
188
|
+
"$type": "color",
|
|
189
|
+
"$description": "危险按钮 hover:加深(浅色下加深才对)"
|
|
189
190
|
},
|
|
190
191
|
"--scrim": {
|
|
191
192
|
"$value": "rgba(21, 24, 28, 0.4)",
|
|
192
193
|
"$type": "color",
|
|
193
|
-
"$description": "
|
|
194
|
+
"$description": "抽屉/弹窗遮罩 5.07 AA"
|
|
194
195
|
},
|
|
195
196
|
"--success": {
|
|
196
197
|
"$value": "#2f6b3a",
|
|
197
198
|
"$type": "color",
|
|
198
|
-
"$description": "5.
|
|
199
|
+
"$description": "5.96 vs 纸底 · AA"
|
|
199
200
|
},
|
|
200
201
|
"--warning": {
|
|
201
202
|
"$value": "#8a5a00",
|
|
202
203
|
"$type": "color",
|
|
203
|
-
"$description": "5.
|
|
204
|
+
"$description": "5.53 vs 纸底 · AA"
|
|
204
205
|
},
|
|
205
206
|
"--info": {
|
|
206
207
|
"$value": "#1d5f8a",
|
|
207
208
|
"$type": "color",
|
|
208
|
-
"$description": "
|
|
209
|
+
"$description": "6.41 vs 纸底 · AA"
|
|
209
210
|
},
|
|
210
211
|
"--danger-bg": {
|
|
211
212
|
"$value": "#fdeeec",
|
|
@@ -227,32 +228,32 @@
|
|
|
227
228
|
"--dir-up": {
|
|
228
229
|
"$value": "#c0392b",
|
|
229
230
|
"$type": "color",
|
|
230
|
-
"$description": "
|
|
231
|
+
"$description": "🔴 为什么方向要独立成令牌,而不是复用 --danger / --success 这两组读起来都是\"红/绿\",但它们是**两件事**: --danger / --success = 好恶(错误/成功)。这是**评价**。 --dir-up / --dir-down = 涨跌(方向)。这是**事实**。 把两件事共用一个名字,会在这个场景里立刻暴露: 「研发费用同比 +38%」—— 是\"涨\",但那是**坏消息**。 用 --danger 表示它,颜色说着\"错了\",语义说着\"涨了\",读者收到矛盾信号。 所以方向色单独命名,取值可以与语义色相同(当前就相同), 但**允许将来分开调**:金融终端普遍用比 --danger 更饱和的红。 🔴 口径可整体切换(不要在每个组件里判断) 默认是 A 股 / 东亚口径:**红涨绿跌**。…"
|
|
231
232
|
},
|
|
232
233
|
"--dir-down": {
|
|
233
234
|
"$value": "#2f6b3a",
|
|
234
235
|
"$type": "color",
|
|
235
|
-
"$description": "
|
|
236
|
+
"$description": "跌:默认绿"
|
|
236
237
|
},
|
|
237
238
|
"--accent": {
|
|
238
239
|
"$value": "#1b4d8f",
|
|
239
240
|
"$type": "color",
|
|
240
|
-
"$description": "
|
|
241
|
+
"$description": "🔴 一源原则:一个项目只选一个 accent,不要混用。 accent 决定\"可点击\"的语义,混用等于取消了这层语义。 三选一,把另外两个删掉,别全留着。"
|
|
241
242
|
},
|
|
242
243
|
"--switch-on": {
|
|
243
244
|
"$value": "#1b4d8f",
|
|
244
245
|
"$type": "color",
|
|
245
|
-
"$description": "开关开态轨道色(浅色版):与品牌色一致;暗色下换降彩度值(见 dark 段)。"
|
|
246
|
+
"$description": "开关开态轨道色(浅色版):与品牌色一致;暗色下换降彩度值(见 dark 段)。 不用 var(--accent) —— 暗色下 accent 太亮,铺满一大块会发光。 ⚠️ 这段注释原本**缺开头**,导致 --switch-on 被浏览器当成坏声明丢掉 (实测浅色下取值为空)。已由 token-parse-gate.py 兜住。 7.82 AAA"
|
|
246
247
|
},
|
|
247
248
|
"--accent-hover": {
|
|
248
249
|
"$value": "#163a6d",
|
|
249
250
|
"$type": "color",
|
|
250
|
-
"$description": "
|
|
251
|
+
"$description": "11.29 白字压上 · AAA"
|
|
251
252
|
},
|
|
252
253
|
"--accent-soft": {
|
|
253
254
|
"$value": "#e6eef7",
|
|
254
255
|
"$type": "color",
|
|
255
|
-
"$description": "
|
|
256
|
+
"$description": "focus ring / 浅底,不要拿它放正文"
|
|
256
257
|
},
|
|
257
258
|
"--tooltip-bg": {
|
|
258
259
|
"$value": "#15181c",
|
|
@@ -270,7 +271,7 @@
|
|
|
270
271
|
"--sp-1": {
|
|
271
272
|
"$value": "4px",
|
|
272
273
|
"$type": "dimension",
|
|
273
|
-
"$description": "
|
|
274
|
+
"$description": "间距:8px 网格为基准,大值流体。 想要的值不在表里 => 说明布局没规划,改设计,不要加 token。 🔴 哪些该流体:--sp-4 往上(区块间距,随屏幕变大而变大,观感自然) 哪些不该:--sp-1..3(元素内部间距,流体化会让控件尺寸忽大忽小)"
|
|
274
275
|
},
|
|
275
276
|
"--sp-2": {
|
|
276
277
|
"$value": "8px",
|
|
@@ -282,117 +283,118 @@
|
|
|
282
283
|
},
|
|
283
284
|
"--sp-4": {
|
|
284
285
|
"$value": "clamp(1rem, 0.95rem + 0.3vw, 1.25rem)",
|
|
285
|
-
"$type": "other"
|
|
286
|
+
"$type": "other",
|
|
287
|
+
"$description": "16 → 20px"
|
|
286
288
|
},
|
|
287
289
|
"--sp-5": {
|
|
288
290
|
"$value": "clamp(1.25rem, 1.15rem + 0.7vw, 1.75rem)",
|
|
289
291
|
"$type": "other",
|
|
290
|
-
"$description": "
|
|
292
|
+
"$description": "20 → 28px"
|
|
291
293
|
},
|
|
292
294
|
"--sp-6": {
|
|
293
295
|
"$value": "clamp(1.5rem, 1.3rem + 1.2vw, 2.25rem)",
|
|
294
296
|
"$type": "other",
|
|
295
|
-
"$description": "
|
|
297
|
+
"$description": "24 → 36px"
|
|
296
298
|
},
|
|
297
299
|
"--sp-7": {
|
|
298
300
|
"$value": "clamp(2rem, 1.7rem + 1.8vw, 3.5rem)",
|
|
299
301
|
"$type": "other",
|
|
300
|
-
"$description": "
|
|
302
|
+
"$description": "32 → 56px"
|
|
301
303
|
},
|
|
302
304
|
"--sp-8": {
|
|
303
305
|
"$value": "clamp(2.5rem, 2.1rem + 2.4vw, 4.5rem)",
|
|
304
306
|
"$type": "other",
|
|
305
|
-
"$description": "
|
|
307
|
+
"$description": "40 → 72px"
|
|
306
308
|
},
|
|
307
309
|
"--bp-sm": {
|
|
308
310
|
"$value": "30rem",
|
|
309
311
|
"$type": "dimension",
|
|
310
|
-
"$description": "
|
|
312
|
+
"$description": "480px 大手机 / 小平板"
|
|
311
313
|
},
|
|
312
314
|
"--bp-md": {
|
|
313
315
|
"$value": "48rem",
|
|
314
316
|
"$type": "dimension",
|
|
315
|
-
"$description": "
|
|
317
|
+
"$description": "768px 平板"
|
|
316
318
|
},
|
|
317
319
|
"--bp-lg": {
|
|
318
320
|
"$value": "64rem",
|
|
319
321
|
"$type": "dimension",
|
|
320
|
-
"$description": "
|
|
322
|
+
"$description": "1024px 小笔记本"
|
|
321
323
|
},
|
|
322
324
|
"--bp-xl": {
|
|
323
325
|
"$value": "80rem",
|
|
324
326
|
"$type": "dimension",
|
|
325
|
-
"$description": "
|
|
327
|
+
"$description": "1280px 桌面"
|
|
326
328
|
},
|
|
327
329
|
"--fs-xs": {
|
|
328
330
|
"$value": "0.75rem",
|
|
329
331
|
"$type": "dimension",
|
|
330
|
-
"$description": "
|
|
332
|
+
"$description": "字号阶梯 🔴 修正:上下限从 px 改成 rem。 px 上下限不尊重\"用户把浏览器默认字号调大\"的设置 —— 那样 clamp 的下限会锁死,用户放到 200% 也涨不上去。 rem 基准跟着用户设置走,这是无障碍底线。 🔴 哪些该流体、哪些不该(这条更容易做错): 该流体:正文、小标题、大标题、间距 —— 它们随屏幕变大而变大,观感自然 不该流体**:UI 文本(--fs-xs / --fs-sm)、小间距(--sp-1..3) —— 它们是控件尺寸的一部分。流体会让按钮和输入框在不同屏幕下 大小不一,布局抖动。搜索到的原话: \"UI typography benefits from minimal scaling. Too much fluidity breaks layout.\" 公式:clamp(MIN-REM, REM基准 + VW系数, MAX-REM)…"
|
|
331
333
|
},
|
|
332
334
|
"--fs-sm": {
|
|
333
335
|
"$value": "0.875rem",
|
|
334
336
|
"$type": "dimension",
|
|
335
|
-
"$description": "
|
|
337
|
+
"$description": "14px 固定:UI 文本不流体"
|
|
336
338
|
},
|
|
337
339
|
"--fs-base": {
|
|
338
340
|
"$value": "clamp(1rem, 0.95rem + 0.3vw, 1.125rem)",
|
|
339
341
|
"$type": "other",
|
|
340
|
-
"$description": "
|
|
342
|
+
"$description": "16 → 18px"
|
|
341
343
|
},
|
|
342
344
|
"--fs-md": {
|
|
343
345
|
"$value": "clamp(1.125rem, 1.05rem + 0.5vw, 1.3125rem)",
|
|
344
346
|
"$type": "other",
|
|
345
|
-
"$description": "
|
|
347
|
+
"$description": "18 → 21px"
|
|
346
348
|
},
|
|
347
349
|
"--fs-lg": {
|
|
348
350
|
"$value": "clamp(1.3125rem, 1.2rem + 0.7vw, 1.5rem)",
|
|
349
351
|
"$type": "other",
|
|
350
|
-
"$description": "
|
|
352
|
+
"$description": "21 → 24px"
|
|
351
353
|
},
|
|
352
354
|
"--fs-xl": {
|
|
353
355
|
"$value": "clamp(1.5rem, 1.3rem + 1.2vw, 1.875rem)",
|
|
354
356
|
"$type": "other",
|
|
355
|
-
"$description": "
|
|
357
|
+
"$description": "24 → 30px"
|
|
356
358
|
},
|
|
357
359
|
"--fs-2xl": {
|
|
358
360
|
"$value": "clamp(1.75rem, 1.45rem + 1.8vw, 2.5rem)",
|
|
359
361
|
"$type": "other",
|
|
360
|
-
"$description": "
|
|
362
|
+
"$description": "28 → 40px"
|
|
361
363
|
},
|
|
362
364
|
"--lh-tight": {
|
|
363
365
|
"$value": "1.25",
|
|
364
366
|
"$type": "number",
|
|
365
|
-
"$description": "行高:正文 1.7 是中文长文的舒适值(西文常用 1.5,中文需要更松)"
|
|
367
|
+
"$description": "行高:正文 1.7 是中文长文的舒适值(西文常用 1.5,中文需要更松) 标题"
|
|
366
368
|
},
|
|
367
369
|
"--lh-base": {
|
|
368
370
|
"$value": "1.7",
|
|
369
371
|
"$type": "number",
|
|
370
|
-
"$description": "
|
|
372
|
+
"$description": "正文"
|
|
371
373
|
},
|
|
372
374
|
"--lh-loose": {
|
|
373
375
|
"$value": "1.85",
|
|
374
376
|
"$type": "number",
|
|
375
|
-
"$description": "
|
|
377
|
+
"$description": "长段落、低龄/无障碍场景"
|
|
376
378
|
},
|
|
377
379
|
"--measure-page": {
|
|
378
380
|
"$value": "52rem",
|
|
379
381
|
"$type": "dimension",
|
|
380
|
-
"$description": "
|
|
382
|
+
"$description": "此前 33 个页面各自写 `.wrap { max-width: 680px / 720 / 760 / 800 / 820 / 860 / 900 / 42rem / 44rem / 46rem / 52rem … }` —— 16 种写法。 结果就是「没有全局可改」:想改列宽要改 33 处,漏一处就不一致。 实测众数是 820px(8/33 页),取 52rem = 832px(干净的 rem 值, 且 rem 会跟随用户字号设置,px 不会)。 改这一个令牌 ⇒ 全部页面列宽一起变。"
|
|
381
383
|
},
|
|
382
384
|
"--tracking-title": {
|
|
383
385
|
"$value": "-0.02em",
|
|
384
386
|
"$type": "dimension",
|
|
385
|
-
"$description": "🔴 补:标题字距 --tracking-title(0.4.2)"
|
|
387
|
+
"$description": "🔴 补:标题字距 --tracking-title(0.4.2) 大字号要收紧字距,否则标题散。此前只有 list/nav/states 三页写了 `letter-spacing: -0.02em`(写死值),其余 33 页没有 ⇒ 标题观感不一致。"
|
|
386
388
|
},
|
|
387
389
|
"--r-sm": {
|
|
388
390
|
"$value": "6px",
|
|
389
391
|
"$type": "dimension",
|
|
390
|
-
"$description": "
|
|
392
|
+
"$description": "一套就够。圆角混搭(卡片 20px、按钮 4px)是典型的没想清楚。"
|
|
391
393
|
},
|
|
392
394
|
"--r-xs": {
|
|
393
395
|
"$value": "3px",
|
|
394
396
|
"$type": "dimension",
|
|
395
|
-
"$description": "🔴 补:内嵌小元素用的小圆角(菜单项、标签、chip)。"
|
|
397
|
+
"$description": "🔴 补:内嵌小元素用的小圆角(菜单项、标签、chip)。 之前 dropdown.css 里凭空写了 var(--r-xs, 3px) —— 令牌不存在时 CSS 变量会**静默失效**(整条声明被丢弃),所以一直没被发现。 ⇒ 补上这个令牌(deps 门禁抓到)。"
|
|
396
398
|
},
|
|
397
399
|
"--r-md": {
|
|
398
400
|
"$value": "10px",
|
|
@@ -409,7 +411,7 @@
|
|
|
409
411
|
"--shadow-1": {
|
|
410
412
|
"$value": "0 1px 2px rgba(31, 29, 25, 0.05), 0 1px 3px rgba(31, 29, 25, 0.06)",
|
|
411
413
|
"$type": "other",
|
|
412
|
-
"$description": "
|
|
414
|
+
"$description": "两级。第三级阴影出现的时候,通常说明层级设计出了问题。 y 轴偏移小、模糊大 —— 模拟纸面浮起,不是悬浮在太空。"
|
|
413
415
|
},
|
|
414
416
|
"--shadow-2": {
|
|
415
417
|
"$value": "0 2px 4px rgba(31, 29, 25, 0.05), 0 6px 16px rgba(31, 29, 25, 0.08)",
|
|
@@ -418,27 +420,27 @@
|
|
|
418
420
|
"--dur-fast": {
|
|
419
421
|
"$value": "120ms",
|
|
420
422
|
"$type": "duration",
|
|
421
|
-
"$description": "
|
|
423
|
+
"$description": "颜色、透明度"
|
|
422
424
|
},
|
|
423
425
|
"--dur-base": {
|
|
424
426
|
"$value": "180ms",
|
|
425
427
|
"$type": "duration",
|
|
426
|
-
"$description": "
|
|
428
|
+
"$description": "位移、展开"
|
|
427
429
|
},
|
|
428
430
|
"--dur-slow": {
|
|
429
431
|
"$value": "280ms",
|
|
430
432
|
"$type": "duration",
|
|
431
|
-
"$description": "
|
|
433
|
+
"$description": "大块入场、遮罩"
|
|
432
434
|
},
|
|
433
435
|
"--ease-in-out": {
|
|
434
436
|
"$value": "cubic-bezier(0.77, 0, 0.175, 1)",
|
|
435
437
|
"$type": "cubicBezier",
|
|
436
|
-
"$description": "
|
|
438
|
+
"$description": "屏上位移、折叠"
|
|
437
439
|
},
|
|
438
440
|
"--ease-drawer": {
|
|
439
441
|
"$value": "cubic-bezier(0.32, 0.72, 0, 1)",
|
|
440
442
|
"$type": "cubicBezier",
|
|
441
|
-
"$description": "
|
|
443
|
+
"$description": "抽屉式滑入(iOS 观感)"
|
|
442
444
|
},
|
|
443
445
|
"--lift-sm": {
|
|
444
446
|
"$value": "1px",
|
|
@@ -456,7 +458,7 @@
|
|
|
456
458
|
"--z-base": {
|
|
457
459
|
"$value": "0",
|
|
458
460
|
"$type": "number",
|
|
459
|
-
"$description": "
|
|
461
|
+
"$description": "乱写 z-index(999、9999)是前端最常见的失控点。 只用这六个值。需要更高的 => 说明层级模型有问题。"
|
|
460
462
|
},
|
|
461
463
|
"--z-sticky": {
|
|
462
464
|
"$value": "10",
|
|
@@ -469,12 +471,11 @@
|
|
|
469
471
|
"--z-raised": {
|
|
470
472
|
"$value": "5",
|
|
471
473
|
"$type": "number",
|
|
472
|
-
"$description": "🔴 补回:上一轮\"清理重复 z 令牌\"时把它误删了,"
|
|
474
|
+
"$description": "🔴 补回:上一轮\"清理重复 z 令牌\"时把它误删了, 而 card / pagination 都在用 ⇒ 它们的 z-index 声明**静默失效**。 ⚠️ CSS 变量不存在时**不报错**,声明直接被丢弃 —— 这类问题只能靠门禁抓。 浮起层(卡片悬停、下拉、内层可点元素)"
|
|
473
475
|
},
|
|
474
476
|
"--z-overlay": {
|
|
475
477
|
"$value": "30",
|
|
476
|
-
"$type": "number"
|
|
477
|
-
"$description": "浮起层(卡片悬停、下拉、内层可点元素)"
|
|
478
|
+
"$type": "number"
|
|
478
479
|
},
|
|
479
480
|
"--z-modal": {
|
|
480
481
|
"$value": "40",
|
|
@@ -487,12 +488,12 @@
|
|
|
487
488
|
"--sz-touch": {
|
|
488
489
|
"$value": "44px",
|
|
489
490
|
"$type": "dimension",
|
|
490
|
-
"$description": "
|
|
491
|
+
"$description": "最小命中区(指针)"
|
|
491
492
|
},
|
|
492
493
|
"--sz-touch-sm": {
|
|
493
494
|
"$value": "32px",
|
|
494
495
|
"$type": "dimension",
|
|
495
|
-
"$description": "
|
|
496
|
+
"$description": "次要场景(表格行内等密排)"
|
|
496
497
|
},
|
|
497
498
|
"--measure-prose": {
|
|
498
499
|
"$value": "34em",
|
|
@@ -501,22 +502,23 @@
|
|
|
501
502
|
},
|
|
502
503
|
"--measure-title": {
|
|
503
504
|
"$value": "20em",
|
|
504
|
-
"$type": "dimension"
|
|
505
|
+
"$type": "dimension",
|
|
506
|
+
"$description": "标题比正文窄,避免大字长时间扫视"
|
|
505
507
|
},
|
|
506
508
|
"--measure-lede": {
|
|
507
509
|
"$value": "32em",
|
|
508
510
|
"$type": "dimension",
|
|
509
|
-
"$description": "
|
|
511
|
+
"$description": "导语"
|
|
510
512
|
},
|
|
511
513
|
"--measure-pull": {
|
|
512
514
|
"$value": "30em",
|
|
513
515
|
"$type": "dimension",
|
|
514
|
-
"$description": "
|
|
516
|
+
"$description": "引言块"
|
|
515
517
|
},
|
|
516
518
|
"--measure-aside": {
|
|
517
519
|
"$value": "32em",
|
|
518
520
|
"$type": "dimension",
|
|
519
|
-
"$description": "
|
|
521
|
+
"$description": "边注"
|
|
520
522
|
},
|
|
521
523
|
"--sans": {
|
|
522
524
|
"$value": "/* 拉丁 */\n -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial,\n /* 中文 */\n 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',\n 'Source Han Sans SC', 'Noto Sans CJK SC',\n /* 阿拉伯 / 希伯来 / 泰文(系统通常自带相应字体)*/\n 'Geeza Pro', 'Segoe UI Historic',\n /* 泛型 */\n sans-serif",
|
|
@@ -533,14 +535,13 @@
|
|
|
533
535
|
"--tracking-normal": {
|
|
534
536
|
"$value": "0",
|
|
535
537
|
"$type": "number",
|
|
536
|
-
"$description": "字距:默认 0。中文与拉丁的字距需求不同,"
|
|
538
|
+
"$description": "字距:默认 0。中文与拉丁的字距需求不同, 阿拉伯/希伯来文连字后密度更高,需要更松 —— 下面按语言覆盖。"
|
|
537
539
|
}
|
|
538
540
|
},
|
|
539
541
|
"dark": {
|
|
540
542
|
"--paper": {
|
|
541
543
|
"$value": "#14171A",
|
|
542
|
-
"$type": "color"
|
|
543
|
-
"$description": "⚠️ `:not([data-theme=\"light\"])` —— 让「强制亮」能压过系统暗色。"
|
|
544
|
+
"$type": "color"
|
|
544
545
|
},
|
|
545
546
|
"--surface": {
|
|
546
547
|
"$value": "#1C2024",
|
|
@@ -558,12 +559,12 @@
|
|
|
558
559
|
"--scrollbar-thumb": {
|
|
559
560
|
"$value": "#6E747E",
|
|
560
561
|
"$type": "color",
|
|
561
|
-
"$description": "🔴滚动条(暗色)"
|
|
562
|
+
"$description": "🔴滚动条(暗色) ⚠️ 暗色下 thumb 要比浅色**更亮**(#4A515C)才看得见; 用浅色那档会变成\"黑里有黑\"。 对 #14171a 3.82:1 · 对 #232830 3.15:1 ✅"
|
|
562
563
|
},
|
|
563
564
|
"--scrollbar-thumb-hov": {
|
|
564
565
|
"$value": "#7D828A",
|
|
565
566
|
"$type": "color",
|
|
566
|
-
"$description": "
|
|
567
|
+
"$description": "4.24:1"
|
|
567
568
|
},
|
|
568
569
|
"--border-decor": {
|
|
569
570
|
"$value": "#2A3038",
|
|
@@ -598,17 +599,17 @@
|
|
|
598
599
|
},
|
|
599
600
|
"--text-on-solid": {
|
|
600
601
|
"$value": "#15181c",
|
|
601
|
-
"$type": "color"
|
|
602
|
+
"$type": "color",
|
|
603
|
+
"$description": "暗色:success/danger/warning 都变浅了 ⇒ 实心态换深字"
|
|
602
604
|
},
|
|
603
605
|
"--skeleton-bg": {
|
|
604
606
|
"$value": "#2E343C",
|
|
605
607
|
"$type": "color",
|
|
606
|
-
"$description": "暗色:底色比纸面**略浅**(深底上\"更亮\"才看得出是占位)"
|
|
608
|
+
"$description": "暗色:底色比纸面**略浅**(深底上\"更亮\"才看得出是占位) 亮度差 0.032(契约要求 >0.02)"
|
|
607
609
|
},
|
|
608
610
|
"--skeleton-shimmer": {
|
|
609
611
|
"$value": "rgba(255, 255, 255, 0.06)",
|
|
610
|
-
"$type": "color"
|
|
611
|
-
"$description": "亮度差 0.032(契约要求 >0.02)"
|
|
612
|
+
"$type": "color"
|
|
612
613
|
},
|
|
613
614
|
"--danger": {
|
|
614
615
|
"$value": "#E07A6E",
|
|
@@ -634,7 +635,7 @@
|
|
|
634
635
|
"--dir-up": {
|
|
635
636
|
"$value": "#E07A6E",
|
|
636
637
|
"$type": "color",
|
|
637
|
-
"$description": "方向色(暗色):与 success / danger 同值,理由见浅色段。"
|
|
638
|
+
"$description": "方向色(暗色):与 success / danger 同值,理由见浅色段。 暗色下红 5.60–6.15 · 绿 6.01–6.60,四组底全部 AA。"
|
|
638
639
|
},
|
|
639
640
|
"--dir-down": {
|
|
640
641
|
"$value": "#6FAA7A",
|
|
@@ -647,7 +648,7 @@
|
|
|
647
648
|
"--warning-bg": {
|
|
648
649
|
"$value": "#242A31",
|
|
649
650
|
"$type": "color",
|
|
650
|
-
"$description": "🔴 最终定的(第二次修正):"
|
|
651
|
+
"$description": "🔴 最终定的(第二次修正): 「本身**淡黄色的那些框**你就改成**暖灰色**, 在深色模式下的暖灰色**这个就很好啊」 浅色下 --warning-bg 是 #fbf1dd(淡黄)—— **保持不动**。 暗色下原来是 #2B2313(**深红棕**)⇒ 在冷灰背景里 像一块\"**咖啡色**\"的脏斑 ⇒ 这就是 真机实测看到的。 ⇒ 暗色下改成**暖灰**(保留一点暖调,与浅色的淡黄呼应, 但**不再偏红褐**,与整体的冷灰底融合)。 ⚠️ 只改这一个令牌,**底色/表面/文本一律不动**。"
|
|
651
652
|
},
|
|
652
653
|
"--info": {
|
|
653
654
|
"$value": "#5B9BC4",
|
|
@@ -665,7 +666,7 @@
|
|
|
665
666
|
"--switch-on": {
|
|
666
667
|
"$value": "#3E6EA8",
|
|
667
668
|
"$type": "color",
|
|
668
|
-
"$description": "🔴 开关开态的轨道色 -- 暗色版"
|
|
669
|
+
"$description": "🔴 开关开态的轨道色 -- 暗色版 🔴 **降彩度**:#7AA9DE 太亮,铺满一大块会发光。 实测:滑块是纯白 #FFF,轨道若也接近白 ⇒ 对比不足、边界糊。 ⇒ 轨道取**中深蓝**(#3E6EA8 族),与白滑块有清晰对比, 在 #1C2024 的深底上又不刺眼。"
|
|
669
670
|
},
|
|
670
671
|
"--accent-hover": {
|
|
671
672
|
"$value": "#8FB8E6",
|
|
@@ -678,7 +679,7 @@
|
|
|
678
679
|
"--tooltip-bg": {
|
|
679
680
|
"$value": "#232830",
|
|
680
681
|
"$type": "color",
|
|
681
|
-
"$description": "气泡:暗色下不再\"反色\"(反色会变成浅底深字,在暗界面里像个白块),"
|
|
682
|
+
"$description": "气泡:暗色下不再\"反色\"(反色会变成浅底深字,在暗界面里像个白块), 改用抬高面 + 正文色 —— 但只比纸面亮一档,所以必须补一条描边。 文字/底 11.93:1(AAA),实测见 contrast.py。"
|
|
682
683
|
},
|
|
683
684
|
"--tooltip-fg": {
|
|
684
685
|
"$value": "#E4E7EA",
|