[libadwaita/wip/exalm/accent: 12/16] stylesheet: Add and use gtkmix()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/accent: 12/16] stylesheet: Add and use gtkmix()
- Date: Wed, 16 Jun 2021 10:36:09 +0000 (UTC)
commit 3c433bb7ff77e2a366b574b0825b39dabf53f432
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Jun 12 02:32:00 2021 +0500
stylesheet: Add and use gtkmix()
src/stylesheet/_colors.scss | 4 ++--
src/stylesheet/_functions.scss | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 10fd4578..399f2244 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -43,8 +43,8 @@ $button_checked_active_color: gtkalpha(currentColor, .35);
$fill_color: $accent_color;
$fill_text_color: $accent_text;
-$fill_hover_color: #{"mix(#{$accent_color}, currentColor, .1)"};
-$fill_active_color: #{"mix(#{$accent_color}, black, .2)"};
+$fill_hover_color: gtkmix($accent_color, currentColor, 90%);
+$fill_active_color: gtkmix($accent_color, black, 80%);
$slider_color: mix(white, $base_color, 80%);
$slider_hover_color: white;
diff --git a/src/stylesheet/_functions.scss b/src/stylesheet/_functions.scss
index 5ac80e3b..afc8b648 100644
--- a/src/stylesheet/_functions.scss
+++ b/src/stylesheet/_functions.scss
@@ -1,3 +1,8 @@
@function gtkalpha($c,$a) {
@return unquote("alpha(#{$c},#{$a})");
}
+
+@function gtkmix($c1,$c2,$r) {
+ $ratio: 1 - $r / 100%; // match SCSS mix()
+ @return unquote("mix(#{$c1},#{$c2},#{$ratio})");
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]