Drop default Show Answer/Good highlight (#1820)

Feedback welcome. Discussion at
https://forums.ankiweb.net/t/2-1-5-border-around-good/19175

Partially reverts 301c9587d1
This commit is contained in:
Damien Elmes 2022-04-27 19:26:16 +10:00 committed by GitHub
parent 6f0d86b9a9
commit 27f2e39ff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 16 deletions

View File

@ -49,12 +49,7 @@ button {
margin-bottom: 1em; margin-bottom: 1em;
} }
/** :focus {
* We use .focus to recreate the highlight on the good button
* while the actual focus is actually in the main webview
*/
:focus,
.focus {
outline: 1px auto var(--focus-color); outline: 1px auto var(--focus-color);
.nightMode & { .nightMode & {
@ -63,14 +58,6 @@ button {
} }
} }
#innertable:focus-within .focus:not(:focus) {
outline: none;
.nightMode & {
box-shadow: none;
}
}
.nobold { .nobold {
font-weight: normal; font-weight: normal;
display: inline-block; display: inline-block;

View File

@ -763,7 +763,7 @@ time = %(time)d;
def _showAnswerButton(self) -> None: def _showAnswerButton(self) -> None:
middle = """ middle = """
<span class=stattxt>{}</span><br> <span class=stattxt>{}</span><br>
<button title="{}" id="ansbut" class="focus" onclick='pycmd("ans");'>{}</button>""".format( <button title="{}" id="ansbut" onclick='pycmd("ans");'>{}</button>""".format(
self._remaining(), self._remaining(),
tr.actions_shortcut_key(val=tr.studying_space()), tr.actions_shortcut_key(val=tr.studying_space()),
tr.studying_show_answer(), tr.studying_show_answer(),
@ -851,7 +851,7 @@ time = %(time)d;
def but(i: int, label: str) -> str: def but(i: int, label: str) -> str:
if i == default: if i == default:
extra = """id="defease" class="focus" """ extra = """id="defease" """
else: else:
extra = "" extra = ""
due = self._buttonTime(i, v3_labels=labels) due = self._buttonTime(i, v3_labels=labels)