Closed dstein766 closed 1 year ago
FWIW, I brute-forced a solution by kludging up ChatPortrait.js as follows:
static setChatMessageBackground(html, messageData, authorColor) {
const useUserBackgroundColor = ChatPortrait.settings.useUserColorAsChatBackgroundColor;
if (useUserBackgroundColor) {
if(!html[0].getAttribute('class').includes("round-marker")) {
html[0].style.background = "url(../ui/parchment.jpg) repeat";
html[0].style.backgroundColor = authorColor;
}
//html[0].style.backgroundColor = authorColor;
//@ts-ignore
html[0].style.backgroundBlendMode = "screen";
}
}
Essentially, I figured out that MLD is using its own class to define the formatting of round markers but ChatPortrait overrides that later on when styling GM messages. Since I don't know how to do this elegantly via CSS I simply look at the class and when I see one that came from MLD I don't update the background or background color. The end result looks like the expected behavior (with the character and GM chat cards showing their appropriate player colors).
I'm sure this is REALLY awful and you can hopefully find a much better solution.
FVTT 10.288 DND5E 2.0.3 Chat Portrait 0.8.17 Monk's Little Details 10.2
Confirmed with Find The Culprit. Re-creation environment started with MLD 10.2, libcolorsettings 2.9.0, libchatcommands 1.4.0, and socketlib 1.0.12 locked ON and then continued from there.
MLD relevant setting is "Combat Round Messages: Add a chat message every round to delineate combat messages" turned ON.
Expected behavior:
Observed behavior (only happens when Chat Portraits is active):
The chat text IS present - when CP is turned off the message is readable. So it appears to be some kind of styling issue only when CP is active.