Skip to content

Commit 4c93adc

Browse files
committed
fix(web): simplify the prompt font size fallback
1 parent 9d0c3a9 commit 4c93adc

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

‎apps/web/src/appearanceFonts.ts‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export interface AppearanceFontPreferences {
6666
readonly sizePrompt: number;
6767
readonly sizeCode: number;
6868
readonly smoothing: boolean;
69-
/** Without separate fonts the prompt follows the interface, as the terminal follows code. */
7069
readonly separate: boolean;
7170
}
7271

@@ -90,15 +89,10 @@ export function applyAppearanceFontVariables(
9089
}
9190

9291
root.style.fontSize = `${clampInterfaceFontSize(preferences.sizeInterface)}px`;
93-
if (preferences.separate) {
94-
root.style.setProperty(
95-
"--font-size-prompt",
96-
`${clampPromptFontSize(preferences.sizePrompt)}px`,
97-
);
98-
} else {
99-
// The composer then falls back to text-sm, which scales with the interface size.
100-
root.style.removeProperty("--font-size-prompt");
101-
}
92+
root.style.setProperty(
93+
"--font-size-prompt",
94+
preferences.separate ? `${clampPromptFontSize(preferences.sizePrompt)}px` : "var(--text-sm)",
95+
);
10296
const code = clampCodeFontSize(preferences.sizeCode);
10397
root.style.setProperty("--font-size-code", `${code}px`);
10498
root.style.setProperty("--diffs-font-size", `${code}px`);

‎apps/web/src/index.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
131131
--chat-content-max-width: 46rem;
132132
--thread-details-panel-width: 17.5rem;
133133
/* The prompt on phones: iOS zooms into any input under 16px on focus. */
134-
--font-size-prompt-touch: max(var(--font-size-prompt, var(--text-sm)), 16px);
134+
--font-size-prompt-touch: max(var(--font-size-prompt, 1rem), 16px);
135135
/* Horizontal gutter shared by the page header and the chat column, clear of
136136
the device's safe area. */
137137
--workspace-gutter: 0.75rem;

0 commit comments

Comments
 (0)