aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/previews.js
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-02 23:50:27 -0400
committerCraig Jennings <c@cjennings.net>2026-07-02 23:50:27 -0400
commit0ffd6f5a450e716e7ef3297d4bec2fda36649cdf (patch)
treebe3eea222da7603fd14a0830488388eaa9198b48 /scripts/theme-studio/previews.js
parent3581c7d1c05eb514aa5462b1142605541fb64d9e (diff)
downloaddotemacs-0ffd6f5a450e716e7ef3297d4bec2fda36649cdf.tar.gz
dotemacs-0ffd6f5a450e716e7ef3297d4bec2fda36649cdf.zip
feat(theme-studio): previews render the chosen face height
heightCssValue maps a face's height to CSS from its stored kind: a relative multiplier renders as em, an absolute 1/10pt value as true pt, with legacy objects falling back to integer/fractional inference. uiCss feeds it to the mock editor, so the mode-line, mode-line-inactive, and line-number bars visibly thicken with an absolute height while the buffer text stays put; paintUI scales the UI row's sample text; the package-preview span builder swaps its em-only sizing for the same kind-aware value. faceCss now accepts a unit-carrying string for fontSize alongside the existing em number.
Diffstat (limited to 'scripts/theme-studio/previews.js')
-rw-r--r--scripts/theme-studio/previews.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-studio/previews.js b/scripts/theme-studio/previews.js
index 8f8c7698..52a0c640 100644
--- a/scripts/theme-studio/previews.js
+++ b/scripts/theme-studio/previews.js
@@ -2,7 +2,7 @@
// app.js. Pure preview HTML builders (ofs/os/previewLines + renderXxxPreview);
// they reference shared globals (PKGMAP, MAP, faceCss, effFg, ...) and are
// inlined into the page's single script element via the PREVIEWS_J token in app.js.
-function ofs(app,face){const f=PKGMAP[app][face]||{},fg=effFg(pkgEffFg(app,face)),bg=pkgEffBg(app,face);return faceCss(f,fg,bg,{fontSize:(f.height||1),boxBg:bg||MAP['bg']});}
+function ofs(app,face){const f=PKGMAP[app][face]||{},fg=effFg(pkgEffFg(app,face)),bg=pkgEffBg(app,face);return faceCss(f,fg,bg,{fontSize:heightCssValue(f),boxBg:bg||MAP['bg']});}
// The CSS for a UI-owned face rendered off any preview surface: effective fg
// (floored to the default fg) and bg, following the built-in UI inherit chain so
// the rendered color matches what the registry reports. The @ui counterpart to ofs.