Skip to content

Commit 4c07d41

Browse files
committed
TailwindCss 4 fix
Now works perfectly with TailwindCSS 4
1 parent af43f0e commit 4c07d41

35 files changed

+1163
-1469
lines changed

.rnd

1 KB
Binary file not shown.

package-lock.json

Lines changed: 1042 additions & 1347 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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
"eslint-plugin-vue": "^9.32.0",
1919
"prettier": "^3.4.2",
2020
"prettier-plugin-organize-imports": "^4.1.0",
21-
"prettier-plugin-tailwindcss": "^0.6.9",
21+
"prettier-plugin-tailwindcss": "^0.6.11",
2222
"typescript-eslint": "^8.23.0",
2323
"vue-tsc": "^2.2.4"
2424
},
2525
"dependencies": {
2626
"@inertiajs/vue3": "^2.0.0-beta.3",
27+
"@tailwindcss/vite": "^4.1.3",
2728
"@vitejs/plugin-vue": "^5.2.1",
2829
"@vueuse/core": "^12.0.0",
2930
"autoprefixer": "^10.4.20",
@@ -35,7 +36,7 @@
3536
"lucide-vue-next": "^0.468.0",
3637
"reka-ui": "^2.0.0",
3738
"tailwind-merge": "^3.2",
38-
"tailwindcss": "^4.1",
39+
"tailwindcss": "^4.1.3",
3940
"tailwindcss-animate": "^1.0.7",
4041
"typescript": "^5.2.2",
4142
"vite": "^6.2.0",

resources/css/app.css

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

378
body,
479
html {

resources/js/components/AppSidebarHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defineProps<{
1010

1111
<template>
1212
<header
13-
class="flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/70 px-6 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 md:px-4"
13+
class="flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/70 px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4"
1414
>
1515
<div class="flex items-center gap-2">
1616
<SidebarTrigger class="-ml-1" />

resources/js/components/AppearanceTabs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const tabs = [
2626
:class="[
2727
'flex items-center rounded-md px-3.5 py-1.5 transition-colors',
2828
appearance === value
29-
? 'bg-white shadow-sm dark:bg-neutral-700 dark:text-neutral-100'
29+
? 'bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100'
3030
: 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60',
3131
]"
3232
>

resources/js/components/NavUser.vue

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

resources/js/components/TextLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defineProps<Props>();
1717
:tabindex="tabindex"
1818
:method="method"
1919
:as="as"
20-
class="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:!decoration-current dark:decoration-neutral-500"
20+
class="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500"
2121
>
2222
<slot />
2323
</Link>

resources/js/components/ui/button/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
33
export { default as Button } from './Button.vue';
44

55
export const buttonVariants = cva(
6-
'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',
6+
'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',
77
{
88
variants: {
99
variant: {

resources/js/components/ui/card/Card.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const props = defineProps<{
88
</script>
99

1010
<template>
11-
<div :class="cn('rounded-lg border bg-card text-card-foreground shadow-sm', props.class)">
11+
<div :class="cn('rounded-lg border bg-card text-card-foreground shadow-xs', props.class)">
1212
<slot />
1313
</div>
1414
</template>

0 commit comments

Comments
 (0)