Files
next.js/packages/create-next-app/templates/app-tw/js/app/layout.js
35a46b1578 feat: move font variables to html in create-next-app (#89632)
### 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]>
2026-02-09 11:55:56 +01:00

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>
);
}