Change text selection color

This commit is contained in:
Eric Bailey
2024-01-19 11:30:02 -06:00
parent bbc527887d
commit ffbe5dea84
2 changed files with 10 additions and 2 deletions
+4
View File
@@ -86,6 +86,10 @@
} }
} }
::selection {
background-color: var(--backgroundLight);
}
body { body {
display: flex; display: flex;
/* Allows you to scroll below the viewport; default value is visible */ /* Allows you to scroll below the viewport; default value is visible */
+6 -2
View File
@@ -71,7 +71,7 @@
html.colorMode--dark { html.colorMode--dark {
--text: white; --text: white;
--background: hsl(211, 20%, 4%); --background: hsl(211, 20%, 4%);
--backgroundLight: hsl(211, 20%, 10%); --backgroundLight: hsl(211, 20%, 20%);
color-scheme: dark; color-scheme: dark;
} }
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
@@ -85,11 +85,15 @@
html.colorMode--system { html.colorMode--system {
--text: white; --text: white;
--background: hsl(211, 20%, 4%); --background: hsl(211, 20%, 4%);
--backgroundLight: hsl(211, 20%, 10%); --backgroundLight: hsl(211, 20%, 20%);
color-scheme: dark; color-scheme: dark;
} }
} }
::selection {
background-color: var(--backgroundLight);
}
body { body {
display: flex; display: flex;
/* Allows you to scroll below the viewport; default value is visible */ /* Allows you to scroll below the viewport; default value is visible */