mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-10-27 22:52:30 +01:00
Use data-theme attribute for theme switching and set color-scheme (#1808)
- Update theme toggle and initialization scripts to set data-theme attribute - Replace CSS selectors using .dark class with [data-theme="dark"] and [data-theme="light"] attribute selectors - Set CSS color-scheme variable alongside theme colors for better native control appearance - Removes redundant styles --------- Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
This commit is contained in:
@@ -127,18 +127,21 @@
|
||||
--code-block-bg: rgb(46, 46, 51);
|
||||
--code-bg: rgb(55, 56, 62);
|
||||
--border: rgb(51, 51, 51);
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
.list {
|
||||
background: var(--theme);
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-track {
|
||||
background: 0 0;
|
||||
.toc {
|
||||
background: var(--entry);
|
||||
}
|
||||
}
|
||||
|
||||
.list:not(.dark)::-webkit-scrollbar-thumb {
|
||||
border-color: var(--theme);
|
||||
@media (prefers-color-scheme: light) {
|
||||
.list::-webkit-scrollbar-thumb {
|
||||
border-color: var(--code-bg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user