Add dark color scheme for text selection (#829)

This commit is contained in:
Samuel Huang 2024-09-20 04:58:48 -04:00 committed by GitHub
parent 1b8522031c
commit a9c940e7f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,8 @@
--content-bg-color: $content-bg-color;
--card-bg-color: $card-bg-color;
--text-color: $text-color;
--selection-bg: $selection-bg;
--selection-color: $selection-color;
--blockquote-color: $blockquote-color;
--link-color: $link-color;
--link-hover-color: $link-hover-color;
@ -35,6 +37,8 @@ if (hexo-config('darkmode')) {
--content-bg-color: $content-bg-color-dark;
--card-bg-color: $card-bg-color-dark;
--text-color: $text-color-dark;
--selection-bg: $selection-bg-dark;
--selection-color: $selection-color-dark;
--blockquote-color: $blockquote-color-dark;
--link-color: $link-color-dark;
--link-hover-color: $link-hover-color-dark;

View File

@ -1,6 +1,6 @@
::selection {
background: $selection-bg;
color: $selection-color;
background: var(--selection-bg);
color: var(--selection-color);
}
html, body {

View File

@ -59,6 +59,8 @@ $content-bg-color-dark = $black-dim;
// Selection
$selection-bg = $blue-deep;
$selection-color = $gainsboro;
$selection-bg-dark = $grey;
$selection-color-dark = $black-dim;
// Dark mode color
$card-bg-color = $whitesmoke;