From 10a567898783ba300841922fcc1d469408efb0c5 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 20 Jun 2026 16:28:10 -0400 Subject: refactor(theme-studio): drop the orphaned dropdownRowTextColor helper dropdownRowTextColor was exported and unit-tested but had no runtime caller: it computed text color for a vertical-list dropdown row, a UI replaced by the swatch gallery popup (colored buttons, no per-row text), so its regression rationale is moot. Remove the function, its export, and its four tests; regenerate the page (theme-studio.html staged so check-generated stays green). --- scripts/theme-studio/theme-studio.html | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'scripts/theme-studio/theme-studio.html') diff --git a/scripts/theme-studio/theme-studio.html b/scripts/theme-studio/theme-studio.html index 97c36554e..dada0d2c9 100644 --- a/scripts/theme-studio/theme-studio.html +++ b/scripts/theme-studio/theme-studio.html @@ -693,17 +693,6 @@ function resolveUiAttr(face,attr,uimap){ return walkInheritChain(face,f=>UI_INHERIT[f],f=>uimap[f]&&uimap[f][attr]); } -// Text color for a swatch-dropdown popup row. A row showing a real palette color -// sits on the popup's own fixed background, so its name/hex text must inherit the -// popup foreground (return '' to use the CSS color). Coloring it for contrast -// against the swatch instead picks near-black text for a mid/dark swatch, which -// is unreadable on the dark popup. Only the "default" row, filled solid with -// SHOWN, uses a contrast color computed against that fill. -function dropdownRowTextColor(hex,shown,textOnFn){ - if(hex)return ''; - return shown?textOnFn(shown):''; -} - // Turn a theme name into a safe filename slug: collapse runs of disallowed // characters to a single dash, trim leading/trailing dashes, fall back to 'theme'. function slugify(name){return name.replace(/[^A-Za-z0-9._-]+/g,'-').replace(/^-+|-+$/g,'')||'theme';} -- cgit v1.2.3