fix: typed letters not visible in tts funbox if highlight=off (@fehmer) (#5496)

This commit is contained in:
Christian Fehmer 2024-06-16 15:37:09 +02:00 committed by GitHub
parent 120b660efc
commit 90e234f77a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -790,12 +790,15 @@ export async function updateWordElement(
const funbox = FunboxList.get(Config.funbox).find(
(f) => f.functions?.getWordHtml
);
const isTts = FunboxList.get(Config.funbox).find((it) => it.name === "tts");
for (let i = 0; i < input.length; i++) {
const charCorrect = currentWord[i] === input[i];
let correctClass = "correct";
if (Config.highlightMode === "off") {
correctClass = "";
if (isTts) correctClass = "visible";
}
let currentLetter = currentWord[i] as string;

View file

@ -5,3 +5,15 @@
#words .word {
color: transparent !important;
}
#words .word letter.visible {
color: var(--sub-color) !important;
}
#words.flipped .word letter.visible {
color: var(--text-color) !important;
}
#words.flipped.colorfulMode .word letter.visible {
color: var(--main-color) !important;
}