fix(appearance): scale inline px font sizes so text-size reaches all content

The global text-size control only set the root font-size, which scales rem-based text (navbar, menus) but not the dense inline px sizes used across the trip planner, budget, journey and panels — so place titles and addresses stayed fixed. applyAppearance now also exposes the factor as --fs-scale-text, and a codemod wraps inline numeric fontSize in calc(<px> * var(--fs-scale-text, 1)) across components and pages (map popups and PDF excluded). Sizes are byte-identical at 100%; the control now visibly resizes the actual content.
This commit is contained in:
Maurice
2026-06-29 11:47:11 +02:00
committed by Maurice
parent b6a414b79f
commit a3f395e5ac
112 changed files with 938 additions and 930 deletions
+10 -3
View File
@@ -141,9 +141,16 @@ export function applyAppearance(input: ApplyAppearanceInput): AppearanceConfig {
setScaleVar(root, '--fs-scale-body', eff.typeScale.body)
setScaleVar(root, '--fs-scale-caption', eff.typeScale.caption)
// global font scale — coarse accessibility knob; root font-size drives all rem text.
if (eff.fontScale === 1) root.style.removeProperty('font-size')
else root.style.fontSize = `${eff.fontScale * 100}%`
// global font scale: root font-size scales rem-based text; --fs-scale-text
// scales the (migrated) inline px sizes so dense content (trip places,
// addresses, panels) scales too. Both are driven by the same factor.
if (eff.fontScale === 1) {
root.style.removeProperty('font-size')
root.style.removeProperty('--fs-scale-text')
} else {
root.style.fontSize = `${eff.fontScale * 100}%`
root.style.setProperty('--fs-scale-text', String(eff.fontScale))
}
// theme-color meta — unchanged from before (dark #09090b / light #ffffff).
const meta = document.querySelector('meta[name="theme-color"]')