diff --git a/package.json b/package.json index 3296dc0..9100966 100644 --- a/package.json +++ b/package.json @@ -45,13 +45,17 @@ "test:e2e:mobile:accessibility": "cd e2e && npx playwright test --grep @mobile.*@accessibility", "test:mutation": "rm -rf .stryker-tmp && npx stryker run", "test:mutation:quick": "rm -rf .stryker-tmp && npx stryker run --mutate 'src/lib/utils.ts'", - "test:all": "npm run type-check && npm run lint && npm run test:coverage && npm run test:integration:real && npm run check:a11y && npm run test:e2e:fast && npm run test:security:headers", + "test:all": "npm run type-check && npm run lint && npm run test:coverage && npm run test:integration:real && npm run check:a11y && npm run check:visual && npm run test:e2e:fast && npm run test:security:headers", "check:contrast": "tsx scripts/utils/check-color-contrast.ts", "check:headings": "tsx scripts/utils/check-heading-hierarchy.ts", "check:brand-token": "tsx scripts/utils/check-brand-text-token.ts", "check:token-twins": "node scripts/check-token-twins.mjs", "check:grammar": "node scripts/check-visual-grammar.mjs", + "check:accents": "node scripts/check-accents.mjs", + "check:accents:selftest": "node scripts/check-accents.mjs --selftest", "check:grammar:selftest": "node scripts/check-visual-grammar.mjs --selftest", + "check:visual": "npm run check:grammar:selftest && npm run check:grammar && npm run check:accents:selftest && npm run check:accents", + "check:dead": "node scripts/dead-modules.mjs", "check:motion": "tsx scripts/utils/check-motion-constraints.ts", "check:motion:test": "jest --roots '/scripts/utils/__tests__'", "check:a11y": "npm run check:contrast && npm run check:headings && npm run check:brand-token", diff --git a/scripts/check-accents.mjs b/scripts/check-accents.mjs new file mode 100644 index 0000000..fdc020f --- /dev/null +++ b/scripts/check-accents.mjs @@ -0,0 +1,161 @@ +#!/usr/bin/env node +/** + * accent 消费面闸:彩色编码只能出现在「工具 UI」与「图表/序列」里,不得出现在营销面。 + * + * 依据是实测:Bain 全站字色只有 4 个值(#000 #FFF #CC0000 #767676)、面色 3 个; + * Porsche 字色 3 个、面色 4 个,红只出现在按钮上。两家都**没有**用颜色给内容分类。 + * 本仓 2026-06 的 ADR-0004 决策一选了「编号为主 + 4px 色条为辅」,7 个 coding accent + * 因此进了令牌层;实测下来真正在跑的营销代码只用了**一个蓝**(accent-blue)做装饰性 + * 图标砖与状态徽章 —— 也就是这些令牌的存在成本一直是「全站语法」,收益是「一处蓝」。 + * + * 本轮的处置不是删令牌(后台工具 UI 的分类色标确实用得上,图表也要),而是 + * **把消费面收窄**:营销面(app/(marketing)/、components/{sections,detail,content}/ 中 + * 可达的部分)一律不得出现 accent-*。 + * + * 两条防赖设计: + * 1) 豁免**按文件名登记**,不写目录通配 —— 通配会让新文件自动继承豁免。 + * 2) 名单里的文件若命中数变 0,同样判红。豁免名单只会随时间腐化成"没人记得为什么在这" + * 的永久豁免;让它主动报红,才有人去删。 + * + * ⚠ 本闸**只覆盖 Tailwind 类名通道**(`accent-*`),不要把它读成"营销面没有任何彩色编码"。 + * 实测还有**第二条通道**:`src/lib/constants/hero-themes.ts` 的 `accentColor` 以内联样式 + * 进到 DetailHero 的徽章(`detail-hero.tsx:81-86` 的 backgroundColor/color/borderColor 与 + * `--badge-accent`)。11 个主题里有 7 个用非品牌色相(erp #1e3a5f / crm #1e40af / + * bi #0c4a6e / cms #14532d / sds #78350f / oa #4c1d95 / novavis #0f3d3e), + * 落在产品·方案·服务详情页的 hero 上。 + * 为什么本批不一起收:它属于「把首页那一条详情页的做法套到其余模板」,而决策四明确把模板批 + * 推到交付决策人验收之后;且去掉逐产品色相等于取消产品线视觉身份,是设计裁定不是语法收口。 + * 登记于 docs/acceptance/qa-tracker.md,判据口径也要在那里写清"类名通道为零"。 + * + * 退出码:0 成立 / 1 判红(含违规与豁免腐化)/ 2 未能度量(扫描文件数为 0)。 + */ +import { readFileSync, existsSync, readdirSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const ROOT = path.join(path.dirname(fileURLToPath(import.meta.url)), '..'); +const SRC = path.join(ROOT, 'src'); +const ACCENT_RE = /\baccent-(blue|teal|amber|purple|cyan|rose|indigo)\b/g; + +/** 按名登记的豁免:每条都必须仍有命中,否则判红 */ +const ALLOWLIST = [ + // 后台工具 UI:内容模型的类型色标是**分类编码**(16 个模型要靠颜色快速区分), + // 属"数据可视化"族而非编辑面。 + { file: 'src/app/admin/page.tsx', reason: 'CMS 模型类型的分类色标(工具 UI)' }, + // 组件库库存:当前不可达,但作为 ui 原语保留;若哪天被营销面引用,须先改语法。 + { file: 'src/components/ui/product-card.tsx', reason: '组件库库存(不可达,未被营销面引用)' }, + { file: 'src/components/ui/brand-visuals.tsx', reason: '组件库库存(品牌图形调色板本身)' }, +]; + +function walk(dir, acc = []) { + if (!existsSync(dir)) return acc; + for (const e of readdirSync(dir, { withFileTypes: true })) { + if (['node_modules', '.git', 'dist', '_archive'].includes(e.name)) continue; + const p = path.join(dir, e.name); + if (e.isDirectory()) walk(p, acc); + else if (/\.(tsx|ts)$/.test(e.name) && !/\.test\.(ts|tsx)$/.test(e.name) && !e.name.endsWith('.d.ts')) acc.push(p); + } + return acc; +} + +/** + * —— 自证:三个互相独立的情景,每个只测一维 —— + * + * 第一版只喂了一个情景:营销面违规 + 三条豁免**全部有命中**,于是断言 + * `stale.length === 3` 永远不可能成立(豁免有命中正是"不腐化"的定义)。 + * 那不是豁免维度漏测,是**夹具把两个维度的前提写在了同一份数据里、 + * 而这两个前提互斥** —— 属于"仪器坏时仍要失败"的反面:仪器压根没被喂到那一维。 + * 现拆成三份,并补一份全绿情景,防的是另一头:判据写错成恒红, + * 那它也会"抓到"所有负例,自证照样过。 + */ +const ALLOWED_LINES = [ + ['src/app/admin/page.tsx', 'const tone = bg-accent-blue'], + ['src/components/ui/product-card.tsx', 'const x = bg-accent-purple'], + ['src/components/ui/brand-visuals.tsx', 'const y = text-accent-cyan'], +]; +const MARKETING_HIT = ['src/app/(marketing)/x.tsx', '
']; + +const SCENARIOS = [ + { + name: '营销面违规(豁免仍各有命中)', + files: new Map([MARKETING_HIT, ...ALLOWED_LINES]), + expect: { violations: 1, stale: 0 }, + }, + { + name: '豁免腐化(登记在案但命中 0)', + files: new Map([['src/app/(marketing)/y.tsx', '
']]), + expect: { violations: 0, stale: 3 }, + }, + { + name: '全绿(既无违规也无腐化)', + files: new Map(ALLOWED_LINES), + expect: { violations: 0, stale: 0 }, + }, +]; + +function selftest() { + console.log('accent 闸自证(负例必须被抓红,正例必须不判红)'); + let ok = true; + for (const s of SCENARIOS) { + const { violations, stale } = evaluate(s.files); + const pass = violations.length === s.expect.violations && stale.length === s.expect.stale; + if (!pass) ok = false; + console.log( + ` ${pass ? '✓' : '✗'} ${s.name}:违规 ${violations.length}(应 ${s.expect.violations})` + + ` · 腐化 ${stale.length}(应 ${s.expect.stale})`, + ); + } + if (!ok) { + console.log(' ⇒ 上面所有绿灯不作数'); + return 1; + } + return 0; +} + +function evaluate(fileTexts) { + const violations = []; + const hitsByFile = new Map(); + + for (const [rel, text] of fileTexts) { + const hits = [...text.matchAll(ACCENT_RE)]; + if (hits.length === 0) continue; + hitsByFile.set(rel, hits.length); + const allowed = ALLOWLIST.some((a) => a.file === rel); + if (!allowed) { + const line = text.slice(0, hits[0].index).split('\n').length; + violations.push({ file: rel, count: hits.length, at: line, sample: hits[0][0] }); + } + } + + // 豁免腐化:登记了却没命中的文件 + const stale = ALLOWLIST.filter((a) => !hitsByFile.has(a.file)).map((a) => a.file); + return { violations, stale, hitsByFile }; +} + +function main() { + if (process.argv.includes('--selftest')) process.exit(selftest()); + + const files = walk(SRC); + if (files.length === 0) { console.log('未能度量:src 下没扫到任何文件'); process.exit(2); } + const fileTexts = new Map(files.map((f) => [path.relative(ROOT, f).split(path.sep).join('/'), readFileSync(f, 'utf8')])); + const { violations, stale, hitsByFile } = evaluate(fileTexts); + const totalHits = [...hitsByFile.values()].reduce((a, b) => a + b, 0); + const allowedHits = [...hitsByFile].filter(([f]) => ALLOWLIST.some((a) => a.file === f)); + + console.log(`accent 消费面对账:扫描 ${files.length} 个源文件 · 命中 ${totalHits} 处 / ${hitsByFile.size} 文件`); + for (const [f, n] of allowedHits) { + const a = ALLOWLIST.find((x) => x.file === f); + console.log(` · 豁免 ${f} (${n} 处) — ${a.reason}`); + } + let bad = false; + for (const v of violations) { bad = true; console.log(` ✗ 营销面使用彩色编码 ${v.file}:${v.at} (${v.count} 处,如 ${v.sample})`); } + for (const f of stale) { bad = true; console.log(` ✗ 豁免已腐化:${f} 登记在案但命中 0 处 —— 请把这条豁免删掉`); } + if (bad) { console.log('\n不成立'); process.exit(1); } + // 口径写死在这一行:本闸只证明**类名通道**为零。 + // 第二通道(hero-themes 的 accentColor 内联样式)不在它的敏感范围内, + // 说"营销面零彩色编码"会是假陈述 —— 措辞必须与被验的那一维一致。 + console.log('\n成立:营销面零 accent-* 类彩色编码(仅类名通道),且每条豁免都仍有命中'); + console.log(' 口径提示:hero-themes 的 accentColor 走内联样式,本闸不覆盖;实测 7 个非品牌色相仍在,见本文件头部注释与 qa-tracker'); +} + +main(); diff --git a/scripts/check-visual-grammar.mjs b/scripts/check-visual-grammar.mjs index 7451db9..4348226 100644 --- a/scripts/check-visual-grammar.mjs +++ b/scripts/check-visual-grammar.mjs @@ -24,6 +24,7 @@ import { fileURLToPath } from "node:url"; const ROOT = path.join(path.dirname(fileURLToPath(import.meta.url)), ".."); const CSS = path.join(ROOT, "src/app/globals.css"); +const TW_CONFIG = path.join(ROOT, "tailwind.config.js"); // R4 管的「编辑类 CTA 表面」。button.tsx **不在**这里 —— 它的 icon 档与涟漪点是功能性的圆, // 由 R9 双向管(文字档必须直角、icon 档必须保持圆)。 const CTA_SURFACES = [ @@ -32,6 +33,25 @@ const CTA_SURFACES = [ ]; const BUTTON_FILE = "src/components/ui/button.tsx"; +/** + * R10 hover 抬升的**递减棘轮上限**,登记在 module 层而非 checkGrammar 内部, + * 是为了让自证能引用它构造「+1 必须判红 / 恰好等于必须不判红」两个情景。 + * 第一版把 R10 排除在自证外,理由是"喂违规样本会同时改变分母"—— 那句话把 + * 「存量棘轮」和「不可自证」混为一谈了:棘轮的分母**就是**被数的东西, + * 多喂一处抬升正是它的违规形态,不是副作用。没有负例的规则等于没有规则。 + * + * 现值 28 = 2026-10-17 实测(19 文件)。变多判红,变少提示下调登记值。 + */ +const HOVER_LIFT_CEILING = 28; + +/** + * R11 的「外部所有者」豁免:由 Radix 等运行时注入、本就不该由 globals.css 声明的变量。 + * 放在 module 层而不是规则里,是因为**自证夹具也必须引用同一份名单** —— + * 名单在规则里、夹具里再手抄一遍,改一处另一处就悄悄失效(本轮真实踩到: + * 夹具没带上这条引用,豁免腐化判据把「已声明不误报」那一维污染成了假红)。 + */ +const EXTERNAL_OWNED = ["--radix-accordion-content-height"]; + // ---- 源码遍历(只用 node 内置,避开第三方)---- function walk(dir, out = []) { let ents; @@ -77,12 +97,16 @@ function parseRadii(text) { } // ---- 规则实现 ---- -const results = []; -function rule({ id, name, denominator, red, note }) { - results.push({ id, name, denominator, red, note }); -} +// 累加器必须是「每次调用各自一份」。此前 results/rule 挂在 module 层,第二次调 +// checkGrammar 会往同一数组追加,而 selftest 里的 .find("R10") 取到的是**第一次** +// 那份读数 —— 于是 R10 的负对照被读成"不判红"。主流程只调一次所以毫无症状, +// 属于「仪器只在被复用时才坏」那一类,也正是自证该抓的东西。 +function checkGrammar(rawText, rawFiles, twConfig = "") { + const results = []; + const rule = ({ id, name, denominator, red, note }) => { + results.push({ id, name, denominator, red, note }); + }; -function checkGrammar(rawText, rawFiles) { // 闸只看代码:统一先剥注释,再交给各条规则 const text = stripComments(rawText); const files = new Map([...rawFiles].map(([k, v]) => [k, stripComments(v, { line: true })])); @@ -209,6 +233,57 @@ function checkGrammar(rawText, rawFiles) { } rule({ id: "R9", name: "按钮尺寸档直角、icon 档保持圆(双向)", denominator: r9Den, red: r9Red }); + /** + * R10 hover 位移抬升的**递减棘轮**(上限见 module 层 HOVER_LIFT_CEILING 的注释)。 + * 实测两家 hover 都不抬升(Bain 卡片靠 hairline、Porsche 靠图与留白),本批已把 + * .bain-card 的 translateY(-4px) 去掉;但业务代码里还散落着 28 处 hover:-translate-y + * (19 文件),全改是又一次全站视觉改动,不该塞进 tracer-bullet。 + * 所以按"当前实测数"登记上限做递减棘轮:变多判红、变少**不判红但提示下调登记值** + * (改进不该被闸挡住,那是棘轮自堵还债的老坑)。 + */ + let liftCount = 0; + const liftFiles = []; + for (const [rel, f] of files) { + const n = (f.match(/hover:-translate-y/g) || []).length; + if (n > 0) { liftCount += n; liftFiles.push(`${rel}=${n}`); } + } + const r10Red = liftCount > HOVER_LIFT_CEILING + ? [`hover 抬升 ${liftCount} 处 > 登记上限 ${HOVER_LIFT_CEILING}(对标实测两家 hover 都不抬升)`] + : []; + // 「实测 < 登记」的下调提示只进 note、不 print:checkGrammar 现在被自证反复调用, + // 喂合成样本时打「请把上限下调到 0」是噪声,会把人引去改坏登记值。 + rule({ id: "R10", name: `hover 抬升数 ≤ ${HOVER_LIFT_CEILING}(递减棘轮)`, denominator: liftCount, red: r10Red, + note: liftCount < HOVER_LIFT_CEILING + ? `实测 ${liftCount} 处 / ${liftFiles.length} 文件 < 登记 ${HOVER_LIFT_CEILING},请把上限下调到 ${liftCount}` + : `实测 ${liftCount} 处 / ${liftFiles.length} 文件` }); + + /** + * R11 tailwind 映射 → CSS 声明的**悬空守卫**。 + * 本轮真实踩到:三枚彩色阴影令牌从 globals.css 退役后, + * `tailwind.config.js` 里的 boxShadow.brand / brand-hover / glow 三行映射**原样留着**, + * 于是 `shadow-brand` 这个类仍在被生成,只是展开成 `box-shadow: var(--shadow-brand)`, + * 而该自定义属性无人声明 ⇒ 运行时取空、静默什么都不画。 + * 不报错、不判红、单测全绿 —— 属于「孪生问题」里最难发现的那类: + * **删了值但没删引用**,而闸只盯着值那一侧(R5 令牌退役、R7 业务代码零消费,两条都是绿的)。 + * + * 外部所有者的变量(Radix 运行时注入)另列白名单,它们本就不该由 globals.css 声明。 + * 白名单同样按名登记并做腐化检测(登记了却没被引用 = 判红),与 check-accents 一个纪律。 + */ + const declared = new Set([...text.matchAll(/^\s*(--[\w-]+)\s*:/gm)].map((m) => m[1])); + const twRefs = [...new Set([...stripComments(twConfig, { line: true }).matchAll(/var\(\s*(--[\w-]+)/g)].map((m) => m[1]))]; + const r11Red = []; + for (const ref of twRefs) { + if (!declared.has(ref) && !EXTERNAL_OWNED.includes(ref)) { + r11Red.push(`tailwind 映射引用 ${ref},但 globals.css 未声明 —— 该类会静默展开成空值(僵尸令牌)`); + } + } + const deadAllow = EXTERNAL_OWNED.filter((n) => !twRefs.includes(n)); + if (deadAllow.length) { + r11Red.push(`外部所有者白名单已腐化:${deadAllow.join(", ")} 已不再被 tailwind 引用,请删掉这条豁免`); + } + rule({ id: "R11", name: "tailwind 映射的 var(--*) 必有 CSS 声明(僵尸令牌守卫)", denominator: twRefs.length, red: r11Red, + note: `引用 ${twRefs.length} 个变量 · 外部所有者豁免 ${EXTERNAL_OWNED.length - deadAllow.length} 条生效` }); + return results; } @@ -223,7 +298,10 @@ function selftest() { ["src/components/ui/badge.tsx", 'className="rounded-full"'], ["src/app/(marketing)/x.tsx", 'className="shadow-brand-hover"'], ]); - const r = checkGrammar(bad, files); + // 第三参数是 tailwind.config 文本:给一份「引用全部已声明、且带齐外部所有者豁免」的, + // 避免 R11 的红因混进 R1–R9 的读数里(R11 有自己的两侧自证,见下)。 + const RADIX_REF = `keyframes: { refs: { ${EXTERNAL_OWNED.map((v) => `x: 'var(${v})'`).join(", ")} } }`; + const r = checkGrammar(bad, files, `${RADIX_REF}\nboxShadow: { brand: 'var(--shadow-brand)' }`); const redIds = r.filter((x) => x.red.length > 0).map((x) => x.id); const expect = ["R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9"]; const missing = expect.filter((id) => !redIds.includes(id)); @@ -234,6 +312,38 @@ function selftest() { return 1; } console.log(` ✓ ${expect.length}/${expect.length} 条规则对已知违规均判红`); + + // R11 单独两侧自证:僵尸令牌 = tailwind 引用了 CSS 没声明的变量。 + // 夹具里 --shadow-glow 未声明、--shadow-brand 已声明,所以必须只抓前者; + // 若判据恒绿(抓不到)或恒红(连已声明的也报),都算仪器坏。 + // 注意每个夹具都要带上 --radix-accordion-content-height:它是登记在案的外部所有者豁免, + // 不带就会额外触发「豁免腐化」那条红,把「已声明引用不误报」这一维的读数污染掉。 + // (第一版正是踩在这里:把夹具写错读成了判据坏。) + const r11RedIds = (tw) => checkGrammar(bad, new Map(), `${RADIX_REF}\n${tw}`).find((x) => x.id === "R11").red; + const r11Caught = r11RedIds("boxShadow: { brand: 'var(--shadow-brand)', glow: 'var(--shadow-glow)' }"); + const r11Clean = r11RedIds("boxShadow: { brand: 'var(--shadow-brand)' }"); + const r11HitsGlow = r11Caught.some((m) => m.includes("--shadow-glow")); + const r11IgnoresDeclared = r11Clean.length === 0 && !r11Caught.some((m) => m.includes("--shadow-brand")); + if (!r11HitsGlow || !r11IgnoresDeclared) { + console.log(` ✗ R11 不自证:未声明的 --shadow-glow 抓到 ${r11HitsGlow}、已声明的不误报 ${r11IgnoresDeclared} ⇒ 上面所有绿灯不作数`); + return 1; + } + console.log(" ✓ R11 双向:未声明引用判红、已声明引用不误报"); + + // R10 单独两侧自证:它是存量棘轮,判据是「数量 > 上限」,所以负例要按数量构造。 + // 用真实 globals.css 做底,避免其它规则的红因混进来干扰这一维的读数。 + const cssText = existsSync(CSS) ? readFileSync(CSS, "utf8") : ":root { --radius-xs: 0px; }"; + const liftCountAt = (n) => + checkGrammar(cssText, new Map([ + ["src/app/(marketing)/lift.tsx", `
`], + ])).find((x) => x.id === "R10").red.length; + const atCeiling = liftCountAt(HOVER_LIFT_CEILING); + const overCeiling = liftCountAt(HOVER_LIFT_CEILING + 1); + if (atCeiling !== 0 || overCeiling === 0) { + console.log(` ✗ R10 棘轮不自证:上限处判红 ${atCeiling}(应 0)、上限+1 判红 ${overCeiling}(应 >0)⇒ 上面所有绿灯不作数`); + return 1; + } + console.log(` ✓ R10 棘轮双向:${HOVER_LIFT_CEILING} 处不判红、${HOVER_LIFT_CEILING + 1} 处判红`); return 0; } @@ -241,11 +351,13 @@ function main() { if (process.argv.includes("--selftest")) process.exit(selftest()); if (!existsSync(CSS)) { console.log(`未能度量:${CSS} 不存在`); process.exit(2); } + if (!existsSync(TW_CONFIG)) { console.log(`未能度量:${TW_CONFIG} 不存在 —— R11 没有引用方可查`); process.exit(2); } const text = readFileSync(CSS, "utf8"); + const twConfig = readFileSync(TW_CONFIG, "utf8"); const files = new Map(); for (const p of walk(path.join(ROOT, "src"))) files.set(path.relative(ROOT, p), readFileSync(p, "utf8")); - const r = checkGrammar(text, files); + const r = checkGrammar(text, files, twConfig); const unmeasurable = r.filter((x) => x.denominator === 0 && x.id !== "R7"); const red = r.filter((x) => x.red.length > 0); diff --git a/src/app/(marketing)/products/products-content-v3.tsx b/src/app/(marketing)/products/products-content-v3.tsx index 43b5ca3..4eee1f9 100644 --- a/src/app/(marketing)/products/products-content-v3.tsx +++ b/src/app/(marketing)/products/products-content-v3.tsx @@ -122,7 +122,7 @@ function ProductCard({ product, size = 'small' }: { product: Product; size?: 'la
{product.status !== '已发布' && ( - {product.status} + {product.status} )} {bundleLabel} {isExternal && ( @@ -205,11 +205,11 @@ function BundleOverview({ products, pageCopy }: { products: Product[]; pageCopy?
-
+

专业产品

- {standaloneCount} 款独立部署 + {standaloneCount} 款独立部署

聚焦特定领域的高复杂度需求,以独立产品形态提供专业能力,满足安全与合规的严苛要求。 @@ -274,7 +274,7 @@ function SpecializedProductsSection({ products }: { products: Product[] }) {

-
+

diff --git a/src/app/globals.css b/src/app/globals.css index ad8e7fd..ac86319 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -51,7 +51,12 @@ body { --color-brand-section-text: #FBF9F5; --color-brand-section-muted: rgba(248, 250, 252, 0.7); - /* 辅助色:服务/行业编码 */ + /* 辅助色:**dataviz / 工具 UI 专用**(2026-10-17 收窄消费面)。 + ADR-0004 决策一(2026-06-29)当年按「编号为主 + 4px 色条为辅」把 7 个 coding accent + 放进令牌层;实测真正跑起来的营销代码只用了**一个蓝**做装饰性图标砖与状态徽章, + 而两家对标全站字色只有 3–4 个值、没有任何「用颜色给内容分类」。于是成本是 + 「全站语法被稀释」,收益是「一处蓝」⇒ 令牌保留(后台内容模型type色标是分类编码、 + 图表也要用),营销面一律禁用,由 `npm run check:accents` 判红。 */ --color-accent-blue: #3B82F6; --color-accent-blue-soft: rgba(59, 130, 246, 0.12); --color-accent-blue-rgb: 59 130 246; diff --git a/src/components/detail/solution-service-card.tsx b/src/components/detail/solution-service-card.tsx index fd13209..ff482e2 100644 --- a/src/components/detail/solution-service-card.tsx +++ b/src/components/detail/solution-service-card.tsx @@ -125,8 +125,8 @@ export function ServiceCard({ service }: ServiceCardProps) {
-
- +
+

diff --git a/src/components/detail/solution-value.tsx b/src/components/detail/solution-value.tsx index 6008906..2b35abc 100644 --- a/src/components/detail/solution-value.tsx +++ b/src/components/detail/solution-value.tsx @@ -85,7 +85,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) { >

- + 睿新致远解决方案 @@ -104,7 +104,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) { }} className="flex items-start gap-3 text-text-secondary" > - + {solutionItem} ))} @@ -147,7 +147,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) { }} className="bain-card p-7" > -
+

{point.title}

@@ -202,7 +202,7 @@ export function SolutionValueSection({ solution }: SolutionValueSectionProps) {

- + 配 配套专业服务 diff --git a/tailwind.config.js b/tailwind.config.js index 299bca3..e73b8de 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -202,10 +202,11 @@ module.exports = { md: 'var(--shadow-md)', lg: 'var(--shadow-lg)', xl: 'var(--shadow-xl)', - brand: 'var(--shadow-brand)', - 'brand-hover': 'var(--shadow-brand-hover)', + // brand / brand-hover / glow 三枚已随彩色阴影退役(globals.css 里不再声明)。 + // 保留映射会生成 `box-shadow: var(--shadow-brand)` 这种指向未定义自定义属性的死样式: + // 不报错、不算无效,只是**静默什么都不画** —— 正是「令牌孪生」最隐蔽的一种。 + // 由 check:grammar R11 反向看守:tailwind 映射到的 var(--*) 必须在 globals.css 有声明。 inset: 'var(--shadow-inset)', - glow: 'var(--shadow-glow)', }, transitionDuration: { instant: 'var(--transition-instant)',