emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/modus-operandi-theme efb3ed4 022/112: Refine `font-lock


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme efb3ed4 022/112: Refine `font-lock-warning-face' (see commit msg)
Date: Mon, 30 Mar 2020 15:59:30 -0400 (EDT)

branch: externals/modus-operandi-theme
commit efb3ed4dc17383cf9318030ab1fd9a45abe6287f
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>

    Refine `font-lock-warning-face' (see commit msg)
    
    While this is a small change, it actually is not as straightforward.
    
    Normally `font-lock-*' faces are used _directly_ inside a buffer, but
    not on the mode line (they can be used _indirectly_ by other faces that
    inherit them).  An exception to this norm is `font-lock-warning-face'.
    
    The background values of a buffer and of the {in-,}active mode line vary
    considerably.  The latter uses the most pronounced background out of all
    those that are meant to present accent colours (red, green, blue, etc.).
    
    To conform with the overarching objective of this project with regard to
    the WCAG AAA accessibility standard (contrast ratio >= 7:1), it is
    necessary to choose colour combinations that take the background value
    as a known constant.
    
    Put differently, it is necessary to have accent values that are intended
    for use in the mode line (or rather, to be combined with the mode line
    backgrounds).  The subset of colours whose name included the `-active'
    suffix covers this particular need.
    
    Couched in those terms, the use of `yellow-active' as a foreground
    ensures that this face can appear in the mode line as well be cast on
    all background values specified by my themes.
    
    This commit addresses issue 20:
    https://gitlab.com/protesilaos/modus-themes/-/issues/20
---
 modus-operandi-theme.el | 2 +-
 modus-vivendi-theme.el  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 673b4ec..ede492e 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -1124,7 +1124,7 @@ between foreground and background is >= 7:1)."
    `(font-lock-string-face ((,class (:foreground ,blue-alt))))
    `(font-lock-type-face ((,class (:foreground ,magenta-alt))))
    `(font-lock-variable-name-face ((,class (:foreground ,cyan))))
-   `(font-lock-warning-face ((,class (:background ,bg-alt :foreground 
,yellow-alt-other :weight bold))))
+   `(font-lock-warning-face ((,class (:foreground ,yellow-active :weight 
bold))))
    ;;;; fountain-mode
    `(fountain-character ((,class (:foreground ,magenta-alt-other))))
    `(fountain-comment ((,class (:foreground ,fg-alt :slant 
,modus-theme-slant))))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 113427f..ac5bc70 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -1124,7 +1124,7 @@ between foreground and background is >= 7:1)."
    `(font-lock-string-face ((,class (:foreground ,blue-alt))))
    `(font-lock-type-face ((,class (:foreground ,magenta-alt))))
    `(font-lock-variable-name-face ((,class (:foreground ,cyan))))
-   `(font-lock-warning-face ((,class (:background ,bg-alt :foreground 
,yellow-alt-other :weight bold))))
+   `(font-lock-warning-face ((,class (:foreground ,yellow-active :weight 
bold))))
    ;;;; fountain-mode
    `(fountain-character ((,class (:foreground ,magenta-alt-other))))
    `(fountain-comment ((,class (:foreground ,fg-alt :slant 
,modus-theme-slant))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]