From 28b8e8c1cc24511758168f30bcac18d8fb93706d Mon Sep 17 00:00:00 2001 From: knottedbrain Date: Tue, 26 Sep 2023 06:06:54 +0000 Subject: [PATCH] Inherit the colors for correct and mistake faces from default faces 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... --- speed-type.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speed-type.el b/speed-type.el index 0b29051..95ed4c4 100644 --- a/speed-type.el +++ b/speed-type.el @@ -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)