[epiphany/wip/exalm/dark: 2/3] CSS: Add Adwaita-dark variant
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/dark: 2/3] CSS: Add Adwaita-dark variant
- Date: Fri, 1 Feb 2019 19:16:13 +0000 (UTC)
commit d5a073c5b9d622263391d1fb9ea4e6c9cea56d19
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sat Feb 2 00:13:06 2019 +0500
CSS: Add Adwaita-dark variant
src/resources/epiphany.gresource.xml | 1 +
src/resources/parse-sass.sh | 2 ++
src/resources/themes/Adwaita-dark.scss | 3 +++
src/resources/themes/_Adwaita-base.scss | 4 ++--
src/resources/themes/_definitions.scss | 6 +++---
5 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/resources/epiphany.gresource.xml b/src/resources/epiphany.gresource.xml
index 6a60aa18c..e26159f15 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -56,5 +56,6 @@
<gresource prefix="/org/gnome/Epiphany">
<file compressed="true">themes/shared.css</file>
<file compressed="true">themes/Adwaita.css</file>
+ <file compressed="true">themes/Adwaita-dark.css</file>
</gresource>
</gresources>
diff --git a/src/resources/parse-sass.sh b/src/resources/parse-sass.sh
index 75c2df2af..65b6e4241 100755
--- a/src/resources/parse-sass.sh
+++ b/src/resources/parse-sass.sh
@@ -11,5 +11,7 @@ SASSC_OPT="-M -t compact"
sassc $SASSC_OPT -I${GTK_SOURCE_PATH}/gtk/theme/Adwaita \
themes/Adwaita.scss themes/Adwaita.css
+sassc $SASSC_OPT -I${GTK_SOURCE_PATH}/gtk/theme/Adwaita \
+ themes/Adwaita-dark.scss themes/Adwaita-dark.css
sassc $SASSC_OPT -I${GTK_SOURCE_PATH}/gtk/theme/Adwaita \
themes/shared.scss themes/shared.css
diff --git a/src/resources/themes/Adwaita-dark.scss b/src/resources/themes/Adwaita-dark.scss
new file mode 100644
index 000000000..10df3fec9
--- /dev/null
+++ b/src/resources/themes/Adwaita-dark.scss
@@ -0,0 +1,3 @@
+$variant: 'dark';
+
+@import 'Adwaita-base';
diff --git a/src/resources/themes/_Adwaita-base.scss b/src/resources/themes/_Adwaita-base.scss
index 67f2fe18b..284d2d8a2 100644
--- a/src/resources/themes/_Adwaita-base.scss
+++ b/src/resources/themes/_Adwaita-base.scss
@@ -60,7 +60,7 @@
}
&:checked {
- background: image(darken($incognito_color, 17%));
+ background: if($variant == 'light', image(darken($incognito_color, 17%)),
image(darken($incognito_color, 9%)));
border-color: darken($incognito_borders_color, 3%);
border-top-color: darken($incognito_borders_color, 8%);
&:backdrop {
@@ -147,7 +147,7 @@
}
}
-$close_button_fg_color: lighten($fg_color, 10%);
+$close_button_fg_color: if($variant == 'light', lighten($fg_color, 10%), darken($fg_color, 10%));
@mixin close_button($bg:$bg_color, $fg:$close_button_fg_color) {
background: none;
border: none;
diff --git a/src/resources/themes/_definitions.scss b/src/resources/themes/_definitions.scss
index d28ba75c0..14cf00022 100644
--- a/src/resources/themes/_definitions.scss
+++ b/src/resources/themes/_definitions.scss
@@ -3,11 +3,11 @@
// incognito mode
-$incognito_base_color: #d7e3f0;
+$incognito_base_color: if($variant == 'light', #d7e3f0, #1c2438);
$incognito_color: lighten($incognito_base_color, 5%);
$incognito_icon: 'user-not-tracked-symbolic';
-$incognito_edge_color: transparentize(white, 0.2);
-$incognito_borders_color: darken($incognito_color, 11%);
+$incognito_edge_color: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
+$incognito_borders_color: if($variant == 'light', darken($incognito_color, 11%), darken($incognito_color,
5%));
// automation mode
$automation_color: #ff9600;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]