[libadwaita/wip/exalm/accent: 10/11] stylesheet: Add and use gtkmix()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/accent: 10/11] stylesheet: Add and use gtkmix()
- Date: Fri, 11 Jun 2021 22:30:04 +0000 (UTC)
commit 87ad5cf8b0b88b761211f7aeebc437a061f29319
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 | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 7807957a..c801f491 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 7ceccd19..afc8b648 100644
--- a/src/stylesheet/_functions.scss
+++ b/src/stylesheet/_functions.scss
@@ -2,3 +2,7 @@
@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]