aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/theme-studio.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-20 16:28:10 -0400
committerCraig Jennings <c@cjennings.net>2026-06-20 16:28:10 -0400
commitbe93d96a6ef7882e6871627c5e3585852a80dd0f (patch)
tree61c9a022d1aef39fa02edad4a849a196e8ecc7b9 /scripts/theme-studio/theme-studio.html
parent5fa95b5cd42cdd21d96b8a2178a436bfbc645603 (diff)
downloaddotemacs-be93d96a6ef7882e6871627c5e3585852a80dd0f.tar.gz
dotemacs-be93d96a6ef7882e6871627c5e3585852a80dd0f.zip
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).
Diffstat (limited to 'scripts/theme-studio/theme-studio.html')
-rw-r--r--scripts/theme-studio/theme-studio.html11
1 files changed, 0 insertions, 11 deletions
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';}