forked from c-fu/arah2
fix(01-design-tokens-rams-foundation): CR-01 drive bare rounded via deprecated --radius key (0px)
This commit is contained in:
@@ -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)`);
|
||||
|
||||
Reference in New Issue
Block a user