Fix radius var fallback detection (#687)

Strip closing var() parentheses before resolving fallback radius tokens, preserving on-scale values and actionable ignore values.

AI-assisted change: implemented with Codex under @pbakaus direction.
This commit is contained in:
Paul Bakaus
2026-08-31 23:27:49 -04:00
committed by GitHub
parent d3f4cc8f4b
commit 1bcdf80f91
2 changed files with 22 additions and 1 deletions
+3 -1
View File
@@ -995,7 +995,9 @@ function extractRadiusTokens(value) {
return String(value || '')
.replace(/\s*\/\s*/g, ' ')
.split(/\s+/)
.map(token => token.trim())
// var() fallbacks leave the closing parenthesis on the final token. Strip
// it before length resolution so `8px)` is not treated as unitless 8rem.
.map(token => token.trim().replace(/\)+$/, ''))
.filter(Boolean);
}