summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorJeffrey Tse <jeffreytse.mail@gmail.com>2023-08-08 23:54:54 +0800
committerJeffrey Tse <jeffreytse.mail@gmail.com>2023-08-08 23:54:54 +0800
commitf3d2a6fc15e2889c563459ef86137df275714d2c (patch)
treef5e6a5fe30ae2e2b0d140e7e3e224f23dced2370 /assets
parent1ce9fbe44d4bd8c22556321ef8c206baabbec5c7 (diff)
feat: custom selection style support (#119)
Diffstat (limited to 'assets')
-rw-r--r--assets/css/main.scss11
1 files changed, 11 insertions, 0 deletions
diff --git a/assets/css/main.scss b/assets/css/main.scss
index 4b1b4ca..bc45b8a 100644
--- a/assets/css/main.scss
+++ b/assets/css/main.scss
@@ -41,4 +41,15 @@ $click-to-top-light-color: {{ site.click_to_top.light.color | default: "#454545"
$click-to-top-dark-background-color: {{ site.click_to_top.dark.background_color | default: "#34323d" }};
$click-to-top-dark-color: {{ site.click_to_top.dark.color | default: "#bbb" }};
+// Selection styles
+$selection-color: unquote("{{ site.selection.color }}");
+$selection-background-color: unquote("{{ site.selection.background_color }}");
+
+@if $selection-color == "" {
+ $selection-color: inherit;
+}
+@if $selection-background-color == "" {
+ $selection-background-color: rgba(invert($brand-color), 0.3);
+}
+
@import "yat";