aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/styles.css
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-15 19:19:38 -0500
committerCraig Jennings <c@cjennings.net>2026-06-15 19:19:38 -0500
commit7e7b871fe4f8daff724c3df37feb5572464532c1 (patch)
tree3dcfb0e760a22b460bc1188a9b6d7a6b5433a5a3 /scripts/theme-studio/styles.css
parent5ab506d9b65a0d043c08690b86976b1f97889eaf (diff)
downloaddotemacs-7e7b871fe4f8daff724c3df37feb5572464532c1.tar.gz
dotemacs-7e7b871fe4f8daff724c3df37feb5572464532c1.zip
feat(theme-studio): flag unused palette tiles and columns
I added usedPaletteHexes, a reverse lookup over the syntax, ui, and package assignments (plus the ground endpoints) that resolves each reference to a hex. renderPalette outlines a tile whose color is referenced nowhere and outlines a whole column when none of its colors are used, so dead colors stand out for pruning before a theme ships. The check is biased safe: an unresolvable reference marks nothing, so a color that is actually used is never flagged. Node tests cover the lookup. A #unusedtest gate covers the tile and column flags.
Diffstat (limited to 'scripts/theme-studio/styles.css')
-rw-r--r--scripts/theme-studio/styles.css2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/theme-studio/styles.css b/scripts/theme-studio/styles.css
index 39f219843..fba40ac80 100644
--- a/scripts/theme-studio/styles.css
+++ b/scripts/theme-studio/styles.css
@@ -47,6 +47,8 @@
.cat{color:#b4b1a2} .ex{font-size:17px}
.crerr{display:inline-block;margin-left:8px;padding:0 4px;border-radius:3px;background:#2b130e;color:#cb6b4d;border:1px solid #7b3324;font:9pt monospace;vertical-align:middle}
.paltoggle{align-self:flex-start;width:22px;height:22px;padding:0;border:1px solid #3a3a3a;border-radius:4px;background:#1f1c19;color:#e8bd30;font:12px monospace;line-height:1;cursor:pointer;margin-right:6px}
+ .pchip.unused{outline:2px dashed #cb6b4d;outline-offset:-2px}
+ .fstrip.unused-col{outline:1px dashed #cb6b4d;outline-offset:2px;border-radius:8px}
.sbtn{width:17px;height:15px;border:1px solid #3a3a3a;border-radius:3px;background:#eaeaea;color:#111;cursor:pointer;font-size:13px;line-height:1;margin-right:2px;padding:0}
.sbtn.on{background:#0d0b0a;color:#cdced1;border-color:#8a9496}
.pals{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start}