Commit 423e5e6a authored by Alan Daniel's avatar Alan Daniel Committed by Janka Uryga

[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: 's avatarJiwon Choi <devjiwonchoi@gmail.com>
parent 6520b7d9
...@@ -20,7 +20,9 @@ export const metadata = { ...@@ -20,7 +20,9 @@ export const metadata = {
export default function RootLayout({ children }) { export default function RootLayout({ children }) {
return ( return (
<html lang="en"> <html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable}`}> <body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children} {children}
</body> </body>
</html> </html>
......
...@@ -25,7 +25,9 @@ export default function RootLayout({ ...@@ -25,7 +25,9 @@ export default function RootLayout({
}>) { }>) {
return ( return (
<html lang="en"> <html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable}`}> <body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children} {children}
</body> </body>
</html> </html>
......
...@@ -20,6 +20,8 @@ body { ...@@ -20,6 +20,8 @@ body {
color: var(--foreground); color: var(--foreground);
background: var(--background); background: var(--background);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} }
* { * {
......
...@@ -20,6 +20,8 @@ body { ...@@ -20,6 +20,8 @@ body {
color: var(--foreground); color: var(--foreground);
background: var(--background); background: var(--background);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} }
* { * {
......
...@@ -4,7 +4,7 @@ export default function Document() { ...@@ -4,7 +4,7 @@ export default function Document() {
return ( return (
<Html lang="en"> <Html lang="en">
<Head /> <Head />
<body> <body className="antialiased">
<Main /> <Main />
<NextScript /> <NextScript />
</body> </body>
......
...@@ -4,7 +4,7 @@ export default function Document() { ...@@ -4,7 +4,7 @@ export default function Document() {
return ( return (
<Html lang="en"> <Html lang="en">
<Head /> <Head />
<body> <body className="antialiased">
<Main /> <Main />
<NextScript /> <NextScript />
</body> </body>
......
...@@ -20,6 +20,8 @@ body { ...@@ -20,6 +20,8 @@ body {
color: var(--foreground); color: var(--foreground);
background: var(--background); background: var(--background);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} }
* { * {
......
...@@ -20,6 +20,8 @@ body { ...@@ -20,6 +20,8 @@ body {
color: var(--foreground); color: var(--foreground);
background: var(--background); background: var(--background);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} }
* { * {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment