scrollbar colour based on theme (firefox only atm), and theme change hover glow
This commit is contained in:
jetstream0
2023-12-27 05:30:14 +05:30
parent c2de260d51
commit c7db9c6aaf
6 changed files with 45 additions and 17 deletions

View File

@@ -107,6 +107,14 @@ label[for="dark-mode"]:hover {
cursor: pointer;
}
label[for="dark-mode"]:hover::after {
text-shadow: #222 0 0 15px;
}
#dark-mode:checked + label[for="dark-mode"]:hover::after {
text-shadow: white 0 0 15px;
}
#dark-mode + label[for="dark-mode"]::after {
color: black;
content: "🌙";
@@ -117,6 +125,10 @@ label[for="dark-mode"]:hover {
content: "☀️";
}
html:has(#dark-mode:checked) {
scrollbar-color: #747474 #222;
}
@media (prefers-color-scheme: dark) {
#dark-mode + label[for="dark-mode"]::after {
color: white;
@@ -137,4 +149,20 @@ label[for="dark-mode"]:hover {
background-color: white;
color: #222;
}
label[for="dark-mode"]:hover::after {
text-shadow: white 0 0 15px;
}
#dark-mode:checked + label[for="dark-mode"]:hover::after {
text-shadow: #222 0 0 15px;
}
html:has(#dark-mode) {
scrollbar-color: #747474 #222;
}
html:has(#dark-mode:checked) {
scrollbar-color: auto;
}
}