Unverified Commit 139d577c authored by yasmin p's avatar yasmin p Committed by GitHub

Use classnames to set font family in Tailwind create-next-app templates (#66374)

Replaces inline styles in the Tailwind `create-next-app` templates with
classnames to set the font family.
Co-authored-by: 's avatarSam Ko <sam@vercel.com>
parent d82c5fdd
...@@ -2,10 +2,7 @@ import Image from "next/image"; ...@@ -2,10 +2,7 @@ import Image from "next/image";
export default function Home() { export default function Home() {
return ( return (
<div <div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20"
style={{ fontFamily: "var(--font-geist-sans)" }}
>
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start"> <main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image <Image
className="dark:invert" className="dark:invert"
...@@ -15,10 +12,7 @@ export default function Home() { ...@@ -15,10 +12,7 @@ export default function Home() {
height={38} height={38}
priority priority
/> />
<ol <ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{ fontFamily: "var(--font-geist-mono)" }}
>
<li className="mb-2"> <li className="mb-2">
Get started by editing{" "} Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold"> <code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
......
...@@ -2,10 +2,7 @@ import Image from "next/image"; ...@@ -2,10 +2,7 @@ import Image from "next/image";
export default function Home() { export default function Home() {
return ( return (
<div <div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20"
style={{ fontFamily: "var(--font-geist-sans)" }}
>
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start"> <main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image <Image
className="dark:invert" className="dark:invert"
...@@ -15,10 +12,7 @@ export default function Home() { ...@@ -15,10 +12,7 @@ export default function Home() {
height={38} height={38}
priority priority
/> />
<ol <ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{ fontFamily: "var(--font-geist-mono)" }}
>
<li className="mb-2"> <li className="mb-2">
Get started by editing{" "} Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold"> <code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
......
...@@ -15,10 +15,7 @@ const geistMono = localFont({ ...@@ -15,10 +15,7 @@ const geistMono = localFont({
export default function Home() { export default function Home() {
return ( return (
<div <div
className={`${geistSans.variable} ${geistMono.variable} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20`} className={`${geistSans.variable} ${geistMono.variable} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]`}
style={{
fontFamily: "var(--font-geist-sans)",
}}
> >
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start"> <main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image <Image
...@@ -29,12 +26,7 @@ export default function Home() { ...@@ -29,12 +26,7 @@ export default function Home() {
height={38} height={38}
priority priority
/> />
<ol <ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{
fontFamily: "var(--font-geist-mono)",
}}
>
<li className="mb-2"> <li className="mb-2">
Get started by editing{" "} Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold"> <code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
......
...@@ -15,10 +15,7 @@ const geistMono = localFont({ ...@@ -15,10 +15,7 @@ const geistMono = localFont({
export default function Home() { export default function Home() {
return ( return (
<div <div
className={`${geistSans.variable} ${geistMono.variable} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20`} className={`${geistSans.variable} ${geistMono.variable} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]`}
style={{
fontFamily: "var(--font-geist-sans)",
}}
> >
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start"> <main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image <Image
...@@ -29,12 +26,7 @@ export default function Home() { ...@@ -29,12 +26,7 @@ export default function Home() {
height={38} height={38}
priority priority
/> />
<ol <ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{
fontFamily: "var(--font-geist-mono)",
}}
>
<li className="mb-2"> <li className="mb-2">
Get started by editing{" "} Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold"> <code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
......
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