Skip to content

Commit 0790157

Browse files
committed
fix: update packages for tailwindcss 4 and fix postcss config
1 parent 6095cd5 commit 0790157

File tree

6 files changed

+17
-79
lines changed

6 files changed

+17
-79
lines changed

src/TallPreset.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class TallPreset extends Preset
1515
'resolve-url-loader' => '^3.1',
1616
'sass' => '^1.3',
1717
'sass-loader' => '^8.0',
18-
'tailwindcss' => '^3.4',
18+
'tailwindcss' => '^4.0',
19+
'@tailwindcss/postcss' => '^4.0',
20+
'@tailwindcss/vite' => '^4.0',
1921
];
2022

2123
const NPM_PACKAGES_TO_REMOVE = [

stubs/default/postcss.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
3+
"@tailwindcss/postcss": {},
44
autoprefixer: {},
55
},
66
}

stubs/default/resources/sass/app.scss

+2-46
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,10 @@
1-
/**
2-
* This injects Tailwind's base styles, which is a combination of
3-
* Normalize.css and some additional base styles.
4-
*
5-
* You can see the styles here:
6-
* https://unpkg.com/tailwindcss/dist/base.css
7-
*/
8-
@tailwind base;
1+
@import "./tailwind.css";
2+
93

10-
/**
11-
* Remove the default box-shadow for invalid elements to prevent
12-
* inputs in Livewire components showing with a
13-
* red border by default in Firefox.
14-
*
15-
* See: https://github.com/laravel-frontend-presets/tall/issues/7
16-
*/
174
input:invalid, textarea:invalid, select:invalid {
185
box-shadow: none;
196
}
207

21-
/**
22-
* This injects any component classes registered by plugins.
23-
*/
24-
@tailwind components;
25-
26-
/**
27-
* Here you would add any of your custom component classes; stuff that you'd
28-
* want loaded *before* the utilities so that the utilities could still
29-
* override them.
30-
*
31-
* Example:
32-
*
33-
* .btn { ... }
34-
* .form-input { ... }
35-
*/
36-
37-
/**
38-
* This injects all of Tailwind's utility classes, generated based on your
39-
* config file.
40-
*/
41-
@tailwind utilities;
42-
43-
/**
44-
* Here you would add any custom utilities you need that don't come out of the
45-
* box with Tailwind.
46-
*
47-
* Example :
48-
*
49-
* .bg-pattern-graph-paper { ... }
50-
* .skew-45 { ... }
51-
*/
528

539
[x-cloak] {
5410
display: none;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import 'tailwindcss';
2+
3+
@theme {
4+
--font-sans: 'Inter var', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
5+
'Segoe UI Symbol', 'Noto Color Emoji';
6+
}
7+
8+
@plugin '@tailwindcss/forms'
9+
@plugin '@tailwindcss/typography'

stubs/default/tailwind.config.js

-31
This file was deleted.

stubs/default/vite.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { defineConfig } from 'vite'
22
import laravel from 'laravel-vite-plugin'
3+
import tailwindcss from '@tailwindcss/vite'
34

45
export default defineConfig({
56
plugins: [
67
laravel({
78
input: ['resources/sass/app.scss', 'resources/js/app.js'],
89
refresh: true,
910
}),
11+
tailwindcss(),
1012
],
1113
})

0 commit comments

Comments
 (0)