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 | fbf57b59ce564840af9cafc6af57cebc193ebd49 (patch) | |
| tree | 147f52a39efb2f770d6da605e4153a810ede8a4f /scripts/theme-studio/app.js | |
| parent | bf40c421420b9e195e53f5136a83ca726259d4ee (diff) | |
| download | dotemacs-fbf57b59ce564840af9cafc6af57cebc193ebd49.tar.gz dotemacs-fbf57b59ce564840af9cafc6af57cebc193ebd49.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 dce5947e..25764521 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);}; |
