Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions packages/create-next-app/templates/app-tw/js/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import Image from "next/image";

export default function Home() {
return (
<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"
style={{ fontFamily: "var(--font-geist-sans)" }}
>
<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)]">
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image
className="dark:invert"
Expand All @@ -15,10 +12,7 @@ export default function Home() {
height={38}
priority
/>
<ol
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{ fontFamily: "var(--font-geist-mono)" }}
>
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
Expand Down
10 changes: 2 additions & 8 deletions packages/create-next-app/templates/app-tw/ts/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import Image from "next/image";

export default function Home() {
return (
<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"
style={{ fontFamily: "var(--font-geist-sans)" }}
>
<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)]">
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image
className="dark:invert"
Expand All @@ -15,10 +12,7 @@ export default function Home() {
height={38}
priority
/>
<ol
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{ fontFamily: "var(--font-geist-mono)" }}
>
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
Expand Down
12 changes: 2 additions & 10 deletions packages/create-next-app/templates/default-tw/js/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ const geistMono = localFont({
export default function Home() {
return (
<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`}
style={{
fontFamily: "var(--font-geist-sans)",
}}
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)]`}
>
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image
Expand All @@ -29,12 +26,7 @@ export default function Home() {
height={38}
priority
/>
<ol
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{
fontFamily: "var(--font-geist-mono)",
}}
>
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
Expand Down
12 changes: 2 additions & 10 deletions packages/create-next-app/templates/default-tw/ts/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ const geistMono = localFont({
export default function Home() {
return (
<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`}
style={{
fontFamily: "var(--font-geist-sans)",
}}
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)]`}
>
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
<Image
Expand All @@ -29,12 +26,7 @@ export default function Home() {
height={38}
priority
/>
<ol
className="list-inside list-decimal text-sm text-center sm:text-left"
style={{
fontFamily: "var(--font-geist-mono)",
}}
>
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
Expand Down
Loading