diff --git a/theme/scripts/audit.mjs b/theme/scripts/audit.mjs index 7b2999e..823e46b 100644 --- a/theme/scripts/audit.mjs +++ b/theme/scripts/audit.mjs @@ -170,7 +170,10 @@ function parseTokens(path) { } let radiusCount = 0; - for (const m of text.matchAll(/--radius-[A-Za-z0-9-]*\s*:\s*([^;}]+?)\s*;/g)) { + /* (?:-[A-Za-z0-9-]*)? — also matches the deprecated bare --radius key + * that drives the bare `rounded` utility, so a future non-zero bare + * key override cannot escape the drift guard. */ + for (const m of text.matchAll(/--radius(?:-[A-Za-z0-9-]*)?\s*:\s*([^;}]+?)\s*;/g)) { radiusCount++; if (!/^0*\.?0*(px|rem|em)?$/.test(m[1].trim())) { fail(2, `radius token --radius-…: ${m[1].trim()} is not zero — Rams requires absolute zero roundedness (design doc, Shapes)`); diff --git a/theme/scripts/audit.test.mjs b/theme/scripts/audit.test.mjs index 23e840d..1fac233 100644 --- a/theme/scripts/audit.test.mjs +++ b/theme/scripts/audit.test.mjs @@ -27,9 +27,13 @@ * T8 inline style="…" attributes on implementation * pages are audited too (no evasion path around * the