Skip to content

Commit ec0f8e2

Browse files
committed
Adding tailwind upgrade steps
1 parent 91cddfc commit ec0f8e2

23 files changed

+698
-220
lines changed

package-lock.json

Lines changed: 551 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"devDependencies": {
1313
"@eslint/js": "^9.19.0",
1414
"@inertiajs/react": "^2.0.0",
15+
"@tailwindcss/postcss": "^4.0.0",
1516
"@types/react": "^19.0.3",
1617
"@types/react-dom": "^19.0.2",
1718
"@vitejs/plugin-react": "^4.3.4",
18-
"autoprefixer": "^10.4.20",
1919
"concurrently": "^9.0.1",
2020
"eslint": "^9.17.0",
2121
"eslint-config-prettier": "^10.0.1",
@@ -26,7 +26,7 @@
2626
"postcss": "^8.4.49",
2727
"prettier": "^3.4.2",
2828
"prettier-plugin-organize-imports": "^4.1.0",
29-
"prettier-plugin-tailwindcss": "^0.6.9",
29+
"prettier-plugin-tailwindcss": "^0.6.11",
3030
"react": "^19.0.0",
3131
"react-dom": "^19.0.0",
3232
"tailwindcss": "^3.4.16",
@@ -55,4 +55,4 @@
5555
"tailwind-merge": "^2.5.5",
5656
"tailwindcss-animate": "^1.0.7"
5757
}
58-
}
58+
}

postcss.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
3+
'@tailwindcss/postcss': {},
54
},
65
};

resources/css/app.css

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,81 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
3+
@plugin 'tailwindcss-animate';
4+
5+
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
6+
7+
@custom-variant dark (&:is(.dark *));
8+
9+
@theme {
10+
--font-sans:
11+
Figtree, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
12+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
13+
14+
--radius-lg: var(--radius);
15+
--radius-md: calc(var(--radius) - 2px);
16+
--radius-sm: calc(var(--radius) - 4px);
17+
18+
--color-background: hsl(var(--background));
19+
--color-foreground: hsl(var(--foreground));
20+
21+
--color-card: hsl(var(--card));
22+
--color-card-foreground: hsl(var(--card-foreground));
23+
24+
--color-popover: hsl(var(--popover));
25+
--color-popover-foreground: hsl(var(--popover-foreground));
26+
27+
--color-primary: hsl(var(--primary));
28+
--color-primary-foreground: hsl(var(--primary-foreground));
29+
30+
--color-secondary: hsl(var(--secondary));
31+
--color-secondary-foreground: hsl(var(--secondary-foreground));
32+
33+
--color-muted: hsl(var(--muted));
34+
--color-muted-foreground: hsl(var(--muted-foreground));
35+
36+
--color-accent: hsl(var(--accent));
37+
--color-accent-foreground: hsl(var(--accent-foreground));
38+
39+
--color-destructive: hsl(var(--destructive));
40+
--color-destructive-foreground: hsl(var(--destructive-foreground));
41+
42+
--color-border: hsl(var(--border));
43+
--color-input: hsl(var(--input));
44+
--color-ring: hsl(var(--ring));
45+
46+
--color-chart-1: hsl(var(--chart-1));
47+
--color-chart-2: hsl(var(--chart-2));
48+
--color-chart-3: hsl(var(--chart-3));
49+
--color-chart-4: hsl(var(--chart-4));
50+
--color-chart-5: hsl(var(--chart-5));
51+
52+
--color-sidebar: hsl(var(--sidebar-background));
53+
--color-sidebar-foreground: hsl(var(--sidebar-foreground));
54+
--color-sidebar-primary: hsl(var(--sidebar-primary));
55+
--color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
56+
--color-sidebar-accent: hsl(var(--sidebar-accent));
57+
--color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
58+
--color-sidebar-border: hsl(var(--sidebar-border));
59+
--color-sidebar-ring: hsl(var(--sidebar-ring));
60+
}
61+
62+
/*
63+
The default border color has changed to `currentColor` in Tailwind CSS v4,
64+
so we've added these compatibility styles to make sure everything still
65+
looks the same as it did with Tailwind CSS v3.
66+
67+
If we ever want to remove these styles, we need to add an explicit border
68+
color utility to any element that depends on these defaults.
69+
*/
70+
@layer base {
71+
*,
72+
::after,
73+
::before,
74+
::backdrop,
75+
::file-selector-button {
76+
border-color: var(--color-gray-200, currentColor);
77+
}
78+
}
479

580
@layer base {
681
:root {

resources/js/components/app-sidebar-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { type BreadcrumbItem as BreadcrumbItemType } from '@/types';
44

55
export function AppSidebarHeader({ breadcrumbs = [] }: { breadcrumbs?: BreadcrumbItemType[] }) {
66
return (
7-
<header className="flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/50 px-4 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12">
7+
<header className="flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/50 px-4 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12">
88
<div className="flex items-center gap-2">
99
<SidebarTrigger className="-ml-1" />
1010
<Breadcrumbs breadcrumbs={breadcrumbs} />

resources/js/components/appearance-tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function AppearanceToggleTab({ className = '', ...props }: HTMLAt
2121
className={cn(
2222
'flex items-center rounded-md px-3.5 py-1.5 transition-colors',
2323
appearance === value
24-
? 'bg-white shadow-sm dark:bg-neutral-700 dark:text-neutral-100'
24+
? 'bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100'
2525
: 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60',
2626
)}
2727
>

resources/js/components/nav-user.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function NavUser() {
2323
</SidebarMenuButton>
2424
</DropdownMenuTrigger>
2525
<DropdownMenuContent
26-
className="w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg"
26+
className="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg"
2727
align="end"
2828
side={isMobile ? 'bottom' : state === 'collapsed' ? 'left' : 'bottom'}
2929
>

resources/js/components/ui/badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as React from 'react';
44
import { cn } from '@/lib/utils';
55

66
const badgeVariants = cva(
7-
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
7+
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2',
88
{
99
variants: {
1010
variant: {

resources/js/components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as React from 'react';
55
import { cn } from '@/lib/utils';
66

77
const buttonVariants = cva(
8-
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
8+
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
99
{
1010
variants: {
1111
variant: {

resources/js/components/ui/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react';
33
import { cn } from '@/lib/utils';
44

55
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
6-
<div ref={ref} className={cn('rounded-lg border bg-card text-card-foreground shadow-sm', className)} {...props} />
6+
<div ref={ref} className={cn('rounded-lg border bg-card text-card-foreground shadow-xs', className)} {...props} />
77
));
88
Card.displayName = 'Card';
99

0 commit comments

Comments
 (0)