fix(web): preserve primary token in dark theme

This commit is contained in:
2026-07-21 12:55:02 +08:00
parent 907caed363
commit 90266f587d
2 changed files with 3 additions and 1 deletions

View File

@@ -66,6 +66,9 @@ if (existsSync('public/senlinai-icon.svg')) {
if (icon.includes('role=') || icon.includes('aria-labelledby=')) failures.push('brand SVG must not expose presentation ARIA')
}
const appStyles = readFileSync('src/App.css', 'utf8')
if (/\.theme-dark\s*\{[^}]*--color-primary\s*:/s.test(appStyles)) {
failures.push('theme-dark must not override the #165DFF primary token')
}
if (!appStyles.includes('.brand-icon {')) failures.push('brand-icon must have an explicit base size')
if (!appStyles.includes('.brand-lockup.large .brand-icon')) failures.push('login brand icon must have an explicit size')
if (!appStyles.includes('.rail-brand {')) failures.push('rail brand button must have explicit layout')