From 31a552963fa94e5b59f42dc1ee94e919ab153ba7 Mon Sep 17 00:00:00 2001 From: Maik de Kruif Date: Sun, 5 Jan 2025 01:12:49 +0100 Subject: [PATCH] Fix link color on dark mode --- themes/maik-blog/assets/scss/_main.scss | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/themes/maik-blog/assets/scss/_main.scss b/themes/maik-blog/assets/scss/_main.scss index ab0dc38..34af4cd 100644 --- a/themes/maik-blog/assets/scss/_main.scss +++ b/themes/maik-blog/assets/scss/_main.scss @@ -545,13 +545,21 @@ table { position: relative; text-decoration: none; - --link-image: url('data:image/svg+xml;utf8,'); - --check-image: url('data:image/svg+xml;utf8,'); + @mixin link-image($color) { + $color: "rgb(" + red($color) + "," + green($color) + "," + + blue($color) + ")"; + + --background-image: url('data:image/svg+xml;utf8,'); + } - --background-image: var(--link-image); + @include link-image($light-color); + + .dark-theme & { + @include link-image($dark-color); + } &.current-heading { - --background-image: var(--check-image); + --background-image: url('data:image/svg+xml;utf8,'); } &:hover {