Change cloze style when I get it right or wrong

I am using Anki with the Fill the Blanks add-on, and I would like to change the Style way the answer is displayed on the card when I get it right or wrong.

  • If I type the correct answer (SMTP), it appears in green.
  • If I type an incorrect answer, the wrong input is in red, immediately followed by the correct answer, which is underlined and displayed in orange without any spacing between the two.

To illustrate, in the images below:

wrong answer

Essentially, I want to customize these styles: the green, orange, and underlined text. Ideally, I would like to modify it so that:

  • Only the correct answer is displayed, even if I get it wrong; or
  • Alternatively, add some spacing between the incorrect answer and the correct one.

Currently my Styling is set up like this:

.card {
    font-family: Cascadia Code NF;
    font-size: 20px;
    text-align: center;
    color: black;
    background-color: white;
}
.cloze {
    font-weight: bold;
    color: blue;
}
.nightMode .cloze {
    color: lightblue;
}

.card input.st-incomplete {
		font-family: Cascadia Code NF;
		font-weight: bold;
		font-size: 15px;
}
.card input.st-error {
		font-family: Cascadia Code NF;
		font-weight: bold;
		font-size: 15px;
}
.card input.st-ok {
		font-family: Cascadia Code NF;
		font-weight: bold;
		font-size: 15px;
}

Only the correct answer is displayed, even if I get it wrong; or

If you’ve already identified how to target the incorrect element with css, then to not display it, try adding the display: none; style to it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.