[libadwaita] stylesheet: Add foreground colors to the palette
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita] stylesheet: Add foreground colors to the palette
- Date: Thu, 17 Jun 2021 14:05:42 +0000 (UTC)
commit a904e7d474d632454f27dd343b85d62794c90a1a
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Jun 16 15:51:04 2021 +0200
stylesheet: Add foreground colors to the palette
This avoids using magic colors to some extent.
src/stylesheet/_colors.scss | 7 +++++--
src/stylesheet/widgets/_misc.scss | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 7aab2984..3e4617a5 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -1,6 +1,9 @@
// When color definition differs for dark and light variant
// it gets @if ed depending on $variant
+$light_fg: #2e3436;
+$dark_fg: #eeeeec;
+
$accent_color: gtkcolor(accent_color);
$accent_text: gtkcolor(accent_text);
$destructive_color: gtkcolor(destructive_color);
@@ -13,7 +16,7 @@ $error_color: gtkcolor(error_color);
$base_color: if($variant == 'light', $light_1, lighten(desaturate($dark_4, 100%), 2%));
$text_color: if($variant == 'light', black, white);
$bg_color: if($variant == 'light', $light_2, darken(desaturate($dark_3, 100%), 4%));
-$fg_color: if($variant == 'light', #2e3436, #eeeeec);
+$fg_color: if($variant == 'light', $light_fg, $dark_fg);
$accent_standalone_color: gtkmix($accent_color, $text_color, if($variant == 'dark', 50%, 75%));
$destructive_standalone_color: gtkmix($destructive_color, $text_color, if($variant == 'dark', 50%, 75%));
@@ -57,7 +60,7 @@ $scrollbar_slider_color: mix($fg_color, $bg_color, 60%);
$scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);
$scrollbar_slider_active_color: $accent_color;
-$osd_fg_color: #eeeeec;
+$osd_fg_color: $dark_fg;
$osd_text_color: white;
$osd_bg_color: if($variant == 'light', transparentize(darken(desaturate($dark_3, 100%), 4%),0.3),
transparentize(darken(desaturate($dark_3, 100%), 10%),0.3));
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
diff --git a/src/stylesheet/widgets/_misc.scss b/src/stylesheet/widgets/_misc.scss
index cdfdf512..1e627a62 100644
--- a/src/stylesheet/widgets/_misc.scss
+++ b/src/stylesheet/widgets/_misc.scss
@@ -80,7 +80,7 @@ window.dialog.print {
paper {
background: white;
- color: #2e3436;
+ color: $light_fg;
border: 1px solid $borders_color;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]