Skip to content

Commit e2766bd

Browse files
⚡ Upgrade tailwind version to 4 (#170)
* ⚡️ Upgrade Tailwind version to 4 * 🔥 Add GSAP and update theme toggle animations * ✨ Add cursor pointer style for buttons in base layer
1 parent c0538cf commit e2766bd

23 files changed

+852
-1658
lines changed

package-lock.json

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

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@
1212
"@docsearch/js": "^3.9.0",
1313
"@fontsource/poppins": "^5.2.6",
1414
"@tailwindcss/forms": "^0.5.10",
15+
"@tailwindcss/postcss": "^4.1.8",
1516
"@tailwindcss/typography": "^0.5.16",
1617
"alpinejs": "^3.14.9",
17-
"autoprefixer": "^10.4.21",
1818
"axios": "^1.9.0",
19+
"gsap": "^3.13.0",
1920
"laravel-vite-plugin": "^0.7.8",
20-
"motion": "^12.10.4",
21+
"motion": "^12.16.0",
2122
"number-flow": "^0.5.7",
22-
"postcss": "^8.5.3",
23+
"postcss": "^8.5.4",
2324
"prettier": "^3.5.3",
2425
"prettier-plugin-blade": "^2.1.21",
25-
"prettier-plugin-tailwindcss": "^0.6.11",
26-
"tailwindcss": "^3.4.17",
26+
"prettier-plugin-tailwindcss": "^0.6.12",
27+
"tailwindcss": "^4.1.8",
2728
"vite": "^4.5.14"
2829
}
2930
}

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
};

public/js/filament/forms/components/markdown-editor.js

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

public/js/filament/forms/components/rich-editor.js

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

public/js/filament/forms/components/select.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/filament/support/support.js

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

resources/css/app.css

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,50 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
3+
@plugin '@tailwindcss/typography';
4+
@plugin '@tailwindcss/forms';
5+
6+
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
7+
@source '../../storage/framework/views/*.php';
8+
@source '../../vendor/filament/**/*.blade.php';
9+
10+
@custom-variant dark (&:where(.dark, .dark *));
11+
12+
@theme {
13+
--color-mirage: #141624;
14+
--color-haiti: #16182c;
15+
--color-cloud: #2b2e53;
16+
17+
--font-poppins: 'Poppins', Verdana, sans-serif;
18+
}
19+
20+
@utility container {
21+
margin-inline: auto;
22+
}
23+
24+
@layer base {
25+
button:not(:disabled),
26+
[role='button']:not(:disabled) {
27+
cursor: pointer;
28+
}
29+
}
30+
31+
/*
32+
The default border color has changed to `currentcolor` in Tailwind CSS v4,
33+
so we've added these compatibility styles to make sure everything still
34+
looks the same as it did with Tailwind CSS v3.
35+
36+
If we ever want to remove these styles, we need to add an explicit border
37+
color utility to any element that depends on these defaults.
38+
*/
39+
@layer base {
40+
*,
41+
::after,
42+
::before,
43+
::backdrop,
44+
::file-selector-button {
45+
border-color: var(--color-gray-200, currentcolor);
46+
}
47+
}
448

549
@layer base {
650
html {

resources/css/docsearch.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@reference "./app.css"
2+
13
:root {
24
--docsearch-container-background: rgba(0, 0, 0, 0.5);
35
--docsearch-primary-color: #987af1;
@@ -34,11 +36,11 @@
3436
}
3537

3638
.DocSearch-Button-Placeholder {
37-
@apply hidden pl-1 pr-1 text-sm text-black/60 min-[400px]:block min-[520px]:pr-20 dark:text-white/60;
39+
@apply hidden pr-1 pl-1 text-sm text-black/60 min-[400px]:block min-[520px]:pr-20 dark:text-white/60;
3840
}
3941

4042
.DocSearch-Button-Keys {
41-
@apply ml-1 mt-1 hidden min-w-[auto] text-sm leading-none min-[520px]:flex;
43+
@apply mt-1 ml-1 hidden min-w-[auto] text-sm leading-none min-[520px]:flex;
4244
}
4345

4446
.DocSearch-Button-Key {

resources/js/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import './fonts'
22
import './bootstrap'
33
import 'number-flow'
4+
import { gsap } from 'gsap'
45
import {
56
Livewire,
67
Alpine,
@@ -49,6 +50,9 @@ window.motion = {
4950
cubicBezier: cubicBezier,
5051
}
5152

53+
// GSAP
54+
window.gsap = gsap
55+
5256
// Alpine
5357
Alpine.data('codeBlock', codeBlock)
5458
Alpine.magic('refAll', (el) => {

0 commit comments

Comments
 (0)