feat: add empty page color support with new CSS file and update index.html

This commit is contained in:
Alexander
2026-02-28 17:38:29 +03:00
parent 14e65d0ea0
commit 243c299b4a
3 changed files with 10 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="colors.css">
<title>Nevedom Hren</title> <title>Nevedom Hren</title>
</head> </head>
<body class="dark:bg-gray-950 dark:text-white"> <body class="dark:bg-gray-950 dark:text-white">

9
public/colors.css Normal file
View File

@@ -0,0 +1,9 @@
@media (prefers-color-scheme: dark) {
html > body { background: #101828; color: #e5e7eb; }
html:not(.dark) > body { background: #f3f4f6; color: black; }
}
@media (prefers-color-scheme: light) {
html > body { background: #f3f4f6; color: black; }
html.dark > body { background: #101828; color: #e5e7eb; }
}

View File

@@ -1,7 +1,3 @@
@import "tailwindcss"; @import "tailwindcss";
@media (prefers-color-scheme: dark) {
body { background: black; color: white; }
}
@custom-variant dark (&:where(.dark, .dark *)); @custom-variant dark (&:where(.dark, .dark *));