修复暗色模式代码问题

This commit is contained in:
2026-09-17 04:52:14 +08:00
parent d3a09954ba
commit 9ccbeaef50
2 changed files with 10 additions and 2 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
@import "@fontsource-variable/noto-sans/wght.css";
@import "@fontsource-variable/noto-sans-sc/wght.css";
:root { --ink: #0b1622; --blue: #1267d8; --paper: #ffffff; --soft: #f5f7f9; --muted: #75828d; --panel: #f6f7f8; }
:root { --ink: #0b1622; --blue: #1267d8; --paper: #ffffff; --soft: #f5f7f9; --muted: #75828d; --panel: #f6f7f8; color-scheme: light dark; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html { overflow-x: hidden; }
html { overflow-x: hidden; background: #fff; }
body { color: var(--ink); background: var(--paper); font-family: "Noto Sans SC", "Noto Sans", Arial, "Microsoft YaHei", sans-serif; }
@media (prefers-color-scheme: dark) {
html:not([data-theme]), html:not([data-theme]) body { background: #10151d; color-scheme: dark; }
}
a { color: inherit; text-decoration: none; }
.site-header { display: flex; align-items: center; height: 128px; gap: 32px; padding-inline: max(24px, calc((100% - 1200px) / 2)); background: #fff; }
.site-logo { display: inline-flex; align-items: center; min-width: 248px; }
+5
View File
@@ -12,4 +12,9 @@ export const metadata: Metadata = {
export const viewport: Viewport = {
width: "device-width",
initialScale: 1,
colorScheme: "light dark",
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "#ffffff" },
{ media: "(prefers-color-scheme: dark)", color: "#10151d" },
],
};