Fix sidenote background showing dark in light mode

The tufte.css @media (prefers-color-scheme: dark) was applying
dark backgrounds to sidenotes even when the page was in light mode.

Fixed by explicitly setting:
- Light mode: transparent background with dark text (#444)
- Dark mode (manual): dark background (#151515) with light text (#aaa)
- Dark mode (system): dark background (#151515) with light text (#aaa)

Used !important to override tufte.css base styles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-23 12:29:51 -05:00
parent 950adab6ea
commit f6f02fa9d6
+12 -2
View File
@@ -670,14 +670,24 @@
border-left: 4px solid #999;
font-size: 0.95rem;
line-height: 1.6;
color: #444;
color: #444 !important;
background-color: transparent !important;
font-weight: 400;
}
[data-theme="dark"] .sidenote,
[data-theme="dark"] .marginnote {
border-left-color: #666;
color: #aaa;
color: #aaa !important;
background-color: #151515 !important;
}
@media (prefers-color-scheme: dark) {
.sidenote:not([data-theme]),
.marginnote:not([data-theme]) {
color: #aaa !important;
background-color: #151515 !important;
}
}
.sidenote-number,