web: switch main body color depending on theme

This commit is contained in:
wukko 2024-07-14 20:42:32 +06:00
parent 36c11556d7
commit 1712dc8948
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 15 additions and 1 deletions

View file

@ -17,7 +17,17 @@
%sveltekit.head% %sveltekit.head%
</head> </head>
<body data-sveltekit-preload-data="hover" data-sveltekit-preload-code="eager" style="background-color: black"> <style>
body {
background-color: black;
}
@media (prefers-color-scheme: light) {
body {
background-color: white;
}
}
</style>
<body data-sveltekit-preload-data="hover" data-sveltekit-preload-code="eager">
<div style="display: contents"> <div style="display: contents">
%sveltekit.body% %sveltekit.body%
</div> </div>

View file

@ -135,6 +135,10 @@
overscroll-behavior-y: none; overscroll-behavior-y: none;
} }
:global(body) {
background-color: var(--secondary);
}
#cobalt { #cobalt {
position: fixed; position: fixed;
height: 100%; height: 100%;