diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-15 19:21:32 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-15 19:21:32 -0500 |
| commit | 0529189a422072c7f027544dfafc503f37183492 (patch) | |
| tree | 60d6b3df0657429bd0e2bafe927a8b401b3be6f8 /scripts/theme-studio/app.js | |
| parent | 7e7b871fe4f8daff724c3df37feb5572464532c1 (diff) | |
| download | dotemacs-0529189a422072c7f027544dfafc503f37183492.tar.gz dotemacs-0529189a422072c7f027544dfafc503f37183492.zip | |
feat(theme-studio): flag gone color assignments with a border
An assignment pointing at a color no longer in the palette showed only as "(gone)" on hover. I added a distinct solid border to the swatch whenever its current value resolves to "(gone)", so a broken assignment reads at a glance. The solid red outline is set apart from the dashed unused-tile flag, keeping the two palette-state cues distinguishable. A #gonetest gate covers the flagged and unflagged cases.
Diffstat (limited to 'scripts/theme-studio/app.js')
| -rw-r--r-- | scripts/theme-studio/app.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-studio/app.js b/scripts/theme-studio/app.js index dce5947ea..25764521a 100644 --- a/scripts/theme-studio/app.js +++ b/scripts/theme-studio/app.js @@ -74,7 +74,7 @@ function mkColorDropdown(options,cur,onPick,opts={}){ left.disabled=locked||!spanNeighborHex(cur,PALETTE,{bg:MAP['bg'],fg:MAP['p']},-1); right.disabled=locked||!spanNeighborHex(cur,PALETTE,{bg:MAP['bg'],fg:MAP['p']},1); } - function paint(){const shown=displayHex(cur),nm=displayName(cur),ttl=cur?(nm+' '+cur):(nm+(shown?' -> '+shown:''));t.style.background=shown||'#161412';t.style.color=shown?textOn(shown):'#b4b1a2';t.dataset.val=cur||'';t.title=ttl;t.classList.toggle('is-default',!cur); + function paint(){const shown=displayHex(cur),nm=displayName(cur),ttl=cur?(nm+' '+cur):(nm+(shown?' -> '+shown:''));t.style.background=shown||'#161412';t.style.color=shown?textOn(shown):'#b4b1a2';t.dataset.val=cur||'';t.title=ttl;t.classList.toggle('is-default',!cur);t.classList.toggle('gone',!!cur&&nameOf(cur)==='(gone)'); t.innerHTML=opts.compact?`<span class="cddsw" style="background:${shown||'transparent'}"></span>`:`<span class="cddsw" style="background:${shown||'transparent'}"></span>${esc(nm)}`;paintStepButtons();} paint(); left.onclick=e=>{e.stopPropagation();step(-1);}; |
