[create-next-app]: add font antialiasing to templates (#67425)

This PR adds font antialiasing to all the next.js templates (with css or
tw).

### Before

![Screenshot 2024-07-03 at 10 27
02](https://github.com/vercel/next.js/assets/45767683/65778211-23bd-4d20-b1d1-a2f443f73d4d)

### After 

![Screenshot 2024-07-03 at 10 26
38](https://github.com/vercel/next.js/assets/45767683/922188fd-4406-4d08-9b73-74c699d51913)

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
This commit is contained in:
Alan Daniel 2024-07-03 13:36:13 -04:00 committed by GitHub
parent 978af08cc4
commit 13e501fc23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 16 additions and 4 deletions

View file

@ -20,7 +20,9 @@ export const metadata = {
export default function RootLayout({ children }) {
return (
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>

View file

@ -25,7 +25,9 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>

View file

@ -20,6 +20,8 @@ body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {

View file

@ -20,6 +20,8 @@ body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {

View file

@ -4,7 +4,7 @@ export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<body className="antialiased">
<Main />
<NextScript />
</body>

View file

@ -4,7 +4,7 @@ export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<body className="antialiased">
<Main />
<NextScript />
</body>

View file

@ -20,6 +20,8 @@ body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {

View file

@ -20,6 +20,8 @@ body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {