fix: font resize targets correct CSS selector

setChatFontSize was setting --hermes-chat-font-size on
this.containerEl (outer Obsidian view wrapper), but the CSS
default was defined on .hermes-chat-container (inner child).
The child's explicit default overrode the inherited value,
so the font size slider had no visible effect.

Now targets .hermes-chat-container directly.
This commit is contained in:
Helm 2026-07-10 13:16:36 -04:00
parent a819e7dd2f
commit 0cebcf6084
2 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -212,7 +212,8 @@ export class ChatView extends ItemView {
/** Set chat font size via CSS custom property on the container. */ /** Set chat font size via CSS custom property on the container. */
setChatFontSize(size: number): void { setChatFontSize(size: number): void {
this.containerEl.style.setProperty("--hermes-chat-font-size", `${size}px`); const el = this.containerEl.querySelector(".hermes-chat-container") as HTMLElement;
if (el) el.style.setProperty("--hermes-chat-font-size", `${size}px`);
} }
/** Append a message bubble to the chat display and scroll to bottom. */ /** Append a message bubble to the chat display and scroll to bottom. */