From e81f3da9de2f05aeed51d948035994e140c51402 Mon Sep 17 00:00:00 2001 From: Deimos Date: Thu, 25 Jul 2019 21:31:00 -0600 Subject: [PATCH] Solarized Light theme: fix warning color/toast I really dislike the Solarized yellow color. This should be better, and make the warning toasts (used for locked topics, etc.) more readable. --- tildes/scss/themes/_solarized.scss | 1 + tildes/scss/themes/_theme_base.scss | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tildes/scss/themes/_solarized.scss b/tildes/scss/themes/_solarized.scss index 124a6c3..548e5d2 100644 --- a/tildes/scss/themes/_solarized.scss +++ b/tildes/scss/themes/_solarized.scss @@ -77,6 +77,7 @@ $solarized-light: ( "foreground-highlight": $fg-darkest, "foreground-primary": $fg-dark, "foreground-secondary": $fg-lightest, + "warning": $orange, ); body.theme-light { diff --git a/tildes/scss/themes/_theme_base.scss b/tildes/scss/themes/_theme_base.scss index 3e4b155..e8cbe0f 100644 --- a/tildes/scss/themes/_theme_base.scss +++ b/tildes/scss/themes/_theme_base.scss @@ -479,7 +479,12 @@ .toast-warning { background-color: rgba(map-get($theme, "warning"), 0.9); border-color: map-get($theme, "warning"); - color: map-get($theme, "foreground-extreme"); + + @if (perceived-brightness(map-get($theme, "warning")) > 50) { + color: #000; + } @else { + color: #fff; + } } }