Skip to content

Commit 75b30ec

Browse files
committed
TailwindCss v4.
1 parent 9eccece commit 75b30ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+306
-358
lines changed

app/author/[slug]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export default async function AuthorPage({ params, searchParams }: AuthorPagePro
6666
);
6767

6868
return (
69-
<div className="min-h-screen bg-lightGray-100 pb-12 pt-40 dark:bg-gray-900">
70-
<div className="mx-auto max-w-screen-xl px-4">
71-
<div className="mx-auto grid max-w-screen-xl grid-cols-1 gap-12 md:grid-cols-3">
69+
<div className="min-h-screen bg-light-gray-100 pb-12 pt-40 dark:bg-gray-900">
70+
<div className="mx-auto max-w-(--breakpoint-xl) px-4">
71+
<div className="mx-auto grid max-w-(--breakpoint-xl) grid-cols-1 gap-12 md:grid-cols-3">
7272
<aside className="md:col-span-1">
7373
<AnimatedSection
7474
animationType="fadeLeft"

app/blog/[slug]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ export default async function BlogPostPage({ params }: { params: Promise<{ slug:
115115
const tagsArr = getTagsArray(post.tags);
116116

117117
return (
118-
<div className="min-h-screen bg-lightGray-100 dark:bg-gray-900">
118+
<div className="min-h-screen bg-light-gray-100 dark:bg-gray-900">
119119
{/* Hero Section */}
120120
<AnimatedSection animationType="fadeDown" className="pb-0 pt-40 md:pt-48">
121-
<div className="mx-auto max-w-screen-xl px-4">
121+
<div className="mx-auto max-w-(--breakpoint-xl) px-4">
122122
<h1 className="mb-4 text-left text-4xl font-extrabold text-gray-900 dark:text-white md:text-5xl">
123123
{post.title}
124124
</h1>
@@ -175,7 +175,7 @@ export default async function BlogPostPage({ params }: { params: Promise<{ slug:
175175

176176
{/* Blog Content */}
177177
<AnimatedSection animationType="fadeUp" className="py-16">
178-
<div className="mx-auto max-w-screen-xl px-4">
178+
<div className="mx-auto max-w-(--breakpoint-xl) px-4">
179179
<BlogPostContent content={post.content} />
180180
</div>
181181
</AnimatedSection>

app/blog/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ export default async function BlogPage() {
4747
const authors = await getAuthors();
4848

4949
return (
50-
<div className="min-h-screen bg-lightGray-100 dark:bg-gray-900">
50+
<div className="min-h-screen bg-light-gray-100 dark:bg-gray-900">
5151
<AnimatedSection
5252
animationType="fadeDown"
53-
className="relative overflow-hidden bg-lightGray-100 px-0 pb-0 pt-56 dark:bg-gray-900 md:pt-60"
53+
className="relative overflow-hidden bg-light-gray-100 px-0 pb-0 pt-56 dark:bg-gray-900 md:pt-60"
5454
>
55-
<div className="mx-auto max-w-screen-xl px-4">
55+
<div className="mx-auto max-w-(--breakpoint-xl) px-4">
5656
<div className="flex flex-col md:flex-row md:items-center md:justify-between">
5757
<div className="min-w-0 flex-1">
5858
<h1 className="mb-2 text-left text-4xl font-extrabold text-gray-900 dark:text-white md:text-5xl">
@@ -82,7 +82,7 @@ export default async function BlogPage() {
8282
</AnimatedSection>
8383

8484
<section className="px-0 py-16">
85-
<div className="mx-auto max-w-screen-xl px-4">
85+
<div className="mx-auto max-w-(--breakpoint-xl) px-4">
8686
{posts.length > 0 ? (
8787
<AnimatedContainer
8888
as="div"

app/docs/[...slug]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ const skeletonKeys = Array.from({ length: 5 }, () => crypto.randomUUID());
130130
function LoadingFallback() {
131131
return (
132132
<div className="animate-pulse space-y-4">
133-
<div className="h-8 w-3/4 rounded bg-gray-200 dark:bg-gray-700" />
134-
<div className="h-4 w-1/2 rounded bg-gray-200 dark:bg-gray-700" />
133+
<div className="h-8 w-3/4 rounded-sm bg-gray-200 dark:bg-gray-700" />
134+
<div className="h-4 w-1/2 rounded-sm bg-gray-200 dark:bg-gray-700" />
135135
{skeletonKeys.map((key) => (
136-
<div key={key} className="h-4 rounded bg-gray-200 dark:bg-gray-700" />
136+
<div key={key} className="h-4 rounded-sm bg-gray-200 dark:bg-gray-700" />
137137
))}
138138
</div>
139139
);

app/docs/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ export const metadata: Metadata = {
3939
export default function DocsLayout({ children }: { children: ReactNode }) {
4040
return (
4141
<div
42-
className={`${poppins.className} relative min-h-screen bg-lightGray-100 antialiased transition-colors duration-200 dark:bg-gray-900`}
42+
className={`${poppins.className} relative min-h-screen bg-light-gray-100 antialiased transition-colors duration-200 dark:bg-gray-900`}
4343
>
4444
<Navbar />
45-
<div className="mx-auto min-h-[calc(100vh-7rem)] max-w-screen-xl px-4 py-12 pt-56 md:pt-36">
45+
<div className="mx-auto min-h-[calc(100vh-7rem)] max-w-(--breakpoint-xl) px-4 py-12 pt-56 md:pt-36">
4646
<div className="flex flex-col gap-8 lg:flex-row">
4747
<SidebarWrapper />
4848
<main className="flex min-w-0 flex-1 flex-col items-stretch">

app/globals.css

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,82 @@
1-
@import "../node_modules/@south-paw/typeface-minecraft/index.css";
2-
@import "prism-tomorrow.css";
3-
@tailwind base;
4-
@tailwind components;
5-
@tailwind utilities;
1+
@import '../node_modules/@south-paw/typeface-minecraft/index.css' layer(base);
2+
@import './prism-tomorrow.css' layer(base);
3+
@import 'tailwindcss';
64

7-
@layer utilities {
5+
@custom-variant dark (&:is(.dark *));
6+
7+
@theme {
8+
--font-monospace:
9+
'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
10+
11+
--background-image-gradient-radial: radial-gradient(var(--tw-gradient-stops));
12+
--background-image-gradient-conic: conic-gradient(
13+
from 180deg at 50% 50%,
14+
var(--tw-gradient-stops)
15+
);
16+
17+
--color-gray-50: #f7f8fa;
18+
--color-gray-100: #eef1f5;
19+
--color-gray-200: #dde2ea;
20+
--color-gray-300: #c4cdd8;
21+
--color-gray-400: #8d99a9;
22+
--color-gray-500: #5d6b7c;
23+
--color-gray-600: #3e4a59;
24+
--color-gray-700: #2a3441;
25+
--color-gray-800: #141a23;
26+
--color-gray-850: #131720;
27+
--color-gray-900: #0c1218;
28+
--color-gray-950: #080c11;
29+
30+
--color-light-gray-50: #ffffff;
31+
--color-light-gray-100: #fafbfc;
32+
--color-light-gray-200: #f4f6f8;
33+
--color-light-gray-300: #e8ecf1;
34+
--color-light-gray-400: #d3d9e0;
35+
--color-light-gray-500: #b4bcc8;
36+
--color-light-gray-600: #8f99a8;
37+
--color-light-gray-700: #6e7a8c;
38+
--color-light-gray-800: #4e5b6e;
39+
--color-light-gray-850: #3a4655;
40+
--color-light-gray-900: #2a3441;
41+
--color-light-gray-950: #1a1f27;
42+
43+
--radius-xs: 0.125rem;
44+
--radius-sm: 0.25rem;
45+
--radius-md: 0.375rem;
46+
--radius-lg: 0.5rem;
47+
--radius-xl: 0.75rem;
48+
--radius-2xl: 1rem;
49+
--radius-3xl: 1.5rem;
50+
--radius-full: 9999px;
51+
}
52+
53+
/*
54+
The default border color has changed to `currentcolor` in Tailwind CSS v4,
55+
so we've added these compatibility styles to make sure everything still
56+
looks the same as it did with Tailwind CSS v3.
57+
58+
If we ever want to remove these styles, we need to add an explicit border
59+
color utility to any element that depends on these defaults.
60+
*/
61+
@layer base {
62+
*,
63+
::after,
64+
::before,
65+
::backdrop,
66+
::file-selector-button {
67+
border-color: var(--color-gray-200, currentcolor);
68+
}
69+
}
70+
71+
@utility scrollbar-hide {
872
/* Hide scrollbar for Chrome, Safari and Opera */
9-
.scrollbar-hide::-webkit-scrollbar {
73+
&::-webkit-scrollbar {
1074
display: none;
1175
}
1276

1377
/* Hide scrollbar for IE, Edge and Firefox */
14-
.scrollbar-hide {
15-
-ms-overflow-style: none; /* IE and Edge */
16-
scrollbar-width: none; /* Firefox */
17-
}
78+
-ms-overflow-style: none; /* IE and Edge */
79+
scrollbar-width: none; /* Firefox */
1880
}
1981

2082
code[class*="language-"],

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function RootLayout({
107107
return (
108108
<html lang="en" suppressHydrationWarning className={poppins.variable}>
109109
<body
110-
className={`${poppins.className} relative min-h-screen bg-lightGray-100 antialiased dark:bg-gray-900`}
110+
className={`${poppins.className} relative min-h-screen bg-light-gray-100 antialiased dark:bg-gray-900`}
111111
>
112112
<Providers>
113113
<NextTopLoader

app/not-found.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const NotFound: FC = () => {
1515
<div className="flex flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0">
1616
<Link
1717
href="/"
18-
className="rounded-lg bg-blue-600 px-6 py-3 text-sm font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none dark:bg-blue-500 dark:hover:bg-blue-600"
18+
className="rounded-lg bg-blue-600 px-6 py-3 text-sm font-medium text-white transition-colors hover:bg-blue-700 focus:outline-hidden dark:bg-blue-500 dark:hover:bg-blue-600"
1919
>
2020
Go to Homepage
2121
</Link>
2222
<Link
2323
href="/docs"
24-
className="rounded-lg border border-gray-300 bg-white px-6 py-3 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 focus:outline-none dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"
24+
className="rounded-lg border border-gray-300 bg-white px-6 py-3 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 focus:outline-hidden dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"
2525
>
2626
Browse Documentation
2727
</Link>

app/notification-generator/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const metadata: Metadata = {
2929

3030
export default function NotificationGeneratorLayout({ children }: { children: ReactNode }) {
3131
return (
32-
<div className="relative mx-auto min-h-screen max-w-screen-xl bg-lightGray-100 px-4 py-8 pt-32 antialiased dark:bg-gray-900">
32+
<div className="relative mx-auto min-h-screen max-w-(--breakpoint-xl) bg-light-gray-100 px-4 py-8 pt-32 antialiased dark:bg-gray-900">
3333
{children}
3434
</div>
3535
);

app/notification-generator/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function PreviewSection({ previewKey, notification, onPlay, delay }: PreviewSect
6868
<AnimatedElement as="span">
6969
<motion.button
7070
onClick={onPlay}
71-
className="flex items-center rounded-md bg-blue-500 px-4 py-2 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"
71+
className="flex items-center rounded-md bg-blue-500 px-4 py-2 text-white hover:bg-blue-600 focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"
7272
whileHover={{ scale: 1.05 }}
7373
whileTap={{ scale: 0.95 }}
7474
aria-label="Play title animation"

0 commit comments

Comments
 (0)