aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/browser-gates.js
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-03 00:02:48 -0400
committerCraig Jennings <c@cjennings.net>2026-07-03 00:02:48 -0400
commit298e24aa8a0fdd88d2ae8ecb514b3e18b2b4bb5b (patch)
tree71f4918e7e4a6e622b0dfbe22399befbe65336ce /scripts/theme-studio/browser-gates.js
parent0ffd6f5a450e716e7ef3297d4bec2fda36649cdf (diff)
downloaddotemacs-298e24aa8a0fdd88d2ae8ecb514b3e18b2b4bb5b.tar.gz
dotemacs-298e24aa8a0fdd88d2ae8ecb514b3e18b2b4bb5b.zip
feat(theme-studio): pin the remaining chrome at absolute heights
tab-bar, tab-line, line-number, and line-number-current-line join mode-line in the chrome height seeds (apply_modeline_height_default generalized to apply_chrome_height_defaults), each pinned at absolute 130 so no bar or gutter tracks a buffer's enlarged default face. header-line and mode-line-inactive stay unseeded on purpose: both inherit mode-line, so the pin reaches them through the chain and their own value would duplicate state. The line-number pair is seeded individually because the generated theme's explicit specs leave their :inherit unspecified at runtime. header-line, tab-bar, and tab-line also join the UI faces table, so all chrome heights are editable through the size column; the mock-completeness gate exempts the three faces the mock deliberately doesn't draw. WIP.json reconciled and the theme regenerated; every chrome face resolves :height 130 in the live daemon, pins and inherit chains both.
Diffstat (limited to 'scripts/theme-studio/browser-gates.js')
-rw-r--r--scripts/theme-studio/browser-gates.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/theme-studio/browser-gates.js b/scripts/theme-studio/browser-gates.js
index a6b2b4be..3ccec8ea 100644
--- a/scripts/theme-studio/browser-gates.js
+++ b/scripts/theme-studio/browser-gates.js
@@ -187,7 +187,10 @@ if(location.hash==='#mocktest')gate('mocktest',A=>withSavedState(['UIMAP','PKGMA
UIMAP['link']={fg:'#112233',bg:'#aabbcc',weight:null,slant:null,underline:{style:'line',color:null},strike:null,box:null};buildMockFrame();
const linkStyled=Q('[data-face="link"]'),linkSt=linkStyled&&linkStyled.getAttribute('style')||'';
A(linkSt.includes('#112233')&&linkSt.includes('#aabbcc'),'inline UI face preview honors fg and bg: '+linkSt);
- const missing=UI_FACES.map(f=>f[0]).filter(f=>!Q('[data-face="'+f+'"]'));
+ // header-line/tab-bar/tab-line are deliberately not in the mock (editable-
+ // height spec, Decision 4: their row sample suffices), so the sweep skips them
+ const MOCK_EXEMPT=['header-line','tab-bar','tab-line'];
+ const missing=UI_FACES.map(f=>f[0]).filter(f=>!MOCK_EXEMPT.includes(f)&&!Q('[data-face="'+f+'"]'));
A(missing.length===0,'all UI faces are represented in live buffer preview: '+missing.join(','));
buildTable();buildUITable();buildPkgTable();
[['#legbody tr[data-kind="kw"]',5],['#uibody tr[data-face="mode-line"]',5],['#pkgbody tr',5]].forEach(([sel,idx])=>{