Skip to content

Commit 2430a84

Browse files
Merge branch 'main' into node-page-updates
2 parents e7311e0 + 47a7a9d commit 2430a84

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

_includes/layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function Layout(data: Lume.Data) {
1818
<head>
1919
<meta charset="utf-8" />
2020
<meta name="viewport" content="width=device-width, initial-scale=1" />
21+
<meta name="color-scheme" content="light dark" />
2122
<title>{deleteBackticks(data.title)}</title>
2223
{data?.description &&
2324
<meta name="description" content={data.description} />}
@@ -39,14 +40,14 @@ export default function Layout(data: Lume.Data) {
3940
href="/fonts/inter/Inter-Regular.woff2"
4041
as="font"
4142
type="font/woff2"
42-
crossOrigin="true"
43+
crossOrigin="anonymous"
4344
/>
4445
<link
4546
rel="preload"
4647
href="/fonts/inter/Inter-SemiBold.woff2"
4748
as="font"
4849
type="font/woff2"
49-
crossOrigin="true"
50+
crossOrigin="anonymous"
5051
/>
5152
<link rel="me" href="https://fosstodon.org/@deno_land" />
5253
<data.comp.OpenGraph

deno.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@
807807
:host {
808808
--header-height: 6rem;
809809
--subnav-height: 2.5rem;
810+
/* Advertise support to the UA and extensions; enables form controls/scrollbar theming */
811+
color-scheme: light dark;
810812

811813
@media (min-width: 48rem) {
812814
--header-height: 4rem;
@@ -834,6 +836,32 @@
834836
}
835837
}
836838

839+
/* No-JS fallback: respect user's system preference for dark mode */
840+
@media (prefers-color-scheme: dark) {
841+
/* Apply only when no explicit theme class is set */
842+
:root:not(.light):not(.dark),
843+
:host(:not(.light):not(.dark)) {
844+
--color-background-raw: var(--color-black);
845+
--color-background-primary: var(--color-gray-950);
846+
--color-background-secondary: var(--color-gray-900);
847+
--color-background-tertiary: var(--color-gray-800);
848+
--color-foreground-primary: var(--color-gray-50);
849+
--color-foreground-secondary: var(--color-gray-300);
850+
--color-foreground-tertiary: var(--color-gray-800);
851+
--color-foreground-quaternary: var(--color-gray-900);
852+
--color-runtime-background: 124deg, 100%, 3%;
853+
--color-runtime-foreground: 184deg, 100%, 90%;
854+
--color-note: 224deg, 64.3%, 82.9%;
855+
--color-info: 224deg, 64.3%, 69%;
856+
--color-caution: 45.4deg, 93.39%, 67.11%;
857+
--color-primary: var(--color-runtime);
858+
--color-header-highlight: var(--color-runtime);
859+
860+
color: var(--color-foreground-primary);
861+
background-color: var(--color-background-primary);
862+
}
863+
}
864+
837865
@font-face {
838866
font-family: "Inter";
839867
font-style: normal;

0 commit comments

Comments
 (0)