Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Inline globals.css like the rest of the CSS #1039

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions public/globals.css

This file was deleted.

23 changes: 22 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,28 @@ import type { NpmManifest, PackageVersion, ParsedUrlQuery } from '../types';
const existingPaths = new Set(Object.values(pages));
const logoSize = 108;
const css = `
:root {
--brand-color: #16864d;
--background: #fafafa;
--foreground: #18181b;
--muted: #e4e4e7;
--muted-foreground: #3f3f46;
--border: #d4d4d8;
--search-input: #fff;
}

@media (prefers-color-scheme: dark) {
:root {
--brand-color: #32de85;
--background: #09090b;
--foreground: #f4f4f5;
--muted: #27272a;
--muted-foreground: #d4d4d8;
--border: #3f3f46;
--search-input: #18181b;
}
}

body {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -140,7 +162,6 @@ export async function renderPage(
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${escapeHtml(title)}</title>
<meta name="description" content="${escapeHtml(description)}">
<link rel="stylesheet" href="/globals.css">
<style>${css}</style>
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png">
Expand Down
Loading