mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What?
Moves the `fontName.variable` from `<body />` to `<html />`
### Why?
This ensures that portalled elements receives the right font when used
with `:root { }`
Co-authored-by: Tim Neutkens <[email protected]>
29 lines
624 B
JavaScript
29 lines
624 B
JavaScript
import { Geist, Geist_Mono } from "next/font/google";
|
|
import "./globals.css";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata = {
|
|
title: "Create Next App",
|
|
description: "Generated by create next app",
|
|
};
|
|
|
|
export default function RootLayout({ children }) {
|
|
return (
|
|
<html
|
|
lang="en"
|
|
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
|
>
|
|
<body className="min-h-full flex flex-col">{children}</body>
|
|
</html>
|
|
);
|
|
}
|