Skip to content

Commit

Permalink
Inherit the colors for correct and mistake faces from default faces
Browse files Browse the repository at this point in the history
Since there is a huge variance in the visibility of green and red in
various themes it might be better to inherit the colors for
speed-type-correct and speed-type-mistake from the the success and
warning faces. The reason to not inherit from them directly was
in-case the theme does something weird like using a different weight
or having boxes etc...
  • Loading branch information
yilkalargaw authored and dakra committed Sep 26, 2023
1 parent 4f85536 commit 28b8e8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions speed-type.el
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ To remove without replacement, use the form: `(bad-string . \"\")'"
:group 'speed-type)

(defface speed-type-correct
'((t :foreground "green"))
`((t (:inherit 'default :foreground ,(face-foreground 'success))))
"Face for correctly typed characters."
:group 'speed-type)

(defface speed-type-mistake
'((t :foreground "red" :underline "red"))
`((t (:inherit 'default :foreground ,(face-foreground 'error) :underline t)))
"Face for incorrectly typed characters."
:group 'speed-type)

Expand Down

0 comments on commit 28b8e8c

Please sign in to comment.