From 86d084b6fbac9c68d43e9151c40910a27a11d297 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Thu, 15 Jan 2026 17:55:23 -0500 Subject: [PATCH] Fix chat log theme to inherit interface theme --- module/applications/ui/chatLog.mjs | 7 +++++++ styles/less/global/chat.less | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 20dfea8d..a364565f 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -92,6 +92,13 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo super.close(options); } + /** Ensure the chat theme inherits the interface theme */ + _replaceHTML(result, content, options) { + const themedElement = result.log?.querySelector(".chat-log"); + themedElement?.classList.remove("themed", "theme-light", "theme-dark"); + super._replaceHTML(result, content, options); + } + async onRollSimple(event, message) { const buttonType = event.target.dataset.type ?? 'damage', total = message.rolls.reduce((a, c) => a + Roll.fromJSON(c).total, 0), diff --git a/styles/less/global/chat.less b/styles/less/global/chat.less index 69ee369a..95458629 100644 --- a/styles/less/global/chat.less +++ b/styles/less/global/chat.less @@ -2,7 +2,7 @@ @import '../utils/fonts.less'; @import '../utils/mixin.less'; -.theme-light { +#interface.theme-light { .daggerheart.chat-sidebar .chat-log, #chat-notifications .chat-log { .chat-message {