[libadwaita/wip/exalm/accent: 10/17] stylesheet: Unify accent, destructive, success, warning, error colors
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/accent: 10/17] stylesheet: Unify accent, destructive, success, warning, error colors
- Date: Wed, 16 Jun 2021 11:02:42 +0000 (UTC)
commit 46c37758dc77fc642f292eaa3c402409a5796025
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Jun 11 23:34:14 2021 +0500
stylesheet: Unify accent, destructive, success, warning, error colors
src/stylesheet/_colors.scss | 17 +++++++++--------
src/stylesheet/widgets/_buttons.scss | 8 ++++----
2 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 2ff4ee02..e0b9796e 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -1,13 +1,20 @@
// When color definition differs for dark and light variant
// it gets @if ed depending on $variant
+$accent_color: if($variant == 'light', #3584e4, #62a0ea);
+$accent_text: #ffffff;
+$destructive_color: if($variant == 'light', #e01b24, #a51d2d);
+$destructive_text: #ffffff;
+
+$success_color: #33d17a;
+$warning_color: #e5a50a;
+$error_color: #e01b24;
+
$base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 100%), 2%));
$text_color: if($variant == 'light', black, white);
$bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));
$fg_color: if($variant == 'light', #2e3436, #eeeeec);
-$accent_text: #ffffff;
-$accent_color: if($variant == 'light', #3584e4, #62a0ea);
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));
$alt_borders_color: if($variant == 'light', darken($bg_color, 24%), darken($bg_color, 18%));
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
@@ -47,12 +54,6 @@ $scrollbar_slider_color: mix($fg_color, $bg_color, 60%);
$scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);
$scrollbar_slider_active_color: darken($accent_color, 10%);
-$warning_color: #e5a50a;
-$error_color: #e01b24;
-$success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
-$suggested_color: $accent_color;
-$destructive_color: if($variant == 'light', $error_color, darken($error_color, 10%));
-
$osd_fg_color: #eeeeec;
$osd_text_color: white;
$osd_bg_color: if($variant == 'light', transparentize(darken(desaturate(#3d3846, 100%), 4%),0.3),
transparentize(darken(desaturate(#3d3846, 100%), 10%),0.3));
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 4ad12343..04814d7a 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -124,10 +124,10 @@ button {
}
// Suggested and Destructive Action buttons
- @each $b_type, $b_color in (suggested-action, $suggested_color),
- (destructive-action, $destructive_color) {
+ @each $b_type, $b_color, $b_text in (suggested-action, $accent_color, $accent_text),
+ (destructive-action, $destructive_color, $destructive_text) {
&.#{$b_type} {
- color: white;
+ color: $b_text;
&, &:checked {
background-color: $b_color;
@@ -201,7 +201,7 @@ button {
}
}
- @each $b_type, $b_color in (suggested-action, $suggested_color),
+ @each $b_type, $b_color in (suggested-action, $accent_color),
(destructive-action, $destructive_color) {
&.#{$b_type} {
color: if($variant == 'light', darken($b_color, 10%), lighten($b_color, 10%));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]