[css] color preference light/dark
All checks were successful
Deploy to S3 / deploy (push) Successful in 43s

This commit is contained in:
2026-04-01 03:01:20 +00:00
parent 3a4cd7d6cd
commit b9afbc231a
2 changed files with 17 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules/ node_modules/
_site/ _site/
scratch.md

View File

@@ -15,6 +15,7 @@
--color-border: #e0e0e0; --color-border: #e0e0e0;
--color-link: #1a1a1a; --color-link: #1a1a1a;
--color-link-hover: #555; --color-link-hover: #555;
--color-pre-bg: #f5f5f5;
--max-width: 960px; --max-width: 960px;
--sidebar-width: 200px; --sidebar-width: 200px;
} }
@@ -135,7 +136,7 @@ a:hover {
} }
.column-body pre { .column-body pre {
background: #f5f5f5; background: var(--color-pre-bg);
padding: 1rem; padding: 1rem;
overflow-x: auto; overflow-x: auto;
margin-bottom: 1rem; margin-bottom: 1rem;
@@ -217,6 +218,20 @@ a:hover {
color: var(--color-text); color: var(--color-text);
} }
/* dark mode */
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #1a1a1a;
--color-text: #e0e0e0;
--color-muted: #999;
--color-border: #333;
--color-link: #e0e0e0;
--color-link-hover: #bbb;
--color-pre-bg: #2a2a2a;
}
}
/* responsive */ /* responsive */
@media (max-width: 640px) { @media (max-width: 640px) {