Skip to content

Commit a6124c4

Browse files
committed
Upgrade Tailwind 3 => 4
1 parent f673075 commit a6124c4

File tree

7 files changed

+690
-990
lines changed

7 files changed

+690
-990
lines changed

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"build": "vite build"
66
},
77
"devDependencies": {
8-
"autoprefixer": "^10.4.0",
8+
"@tailwindcss/postcss": "^4.2.1",
99
"axios": "^1.11.0",
10+
"concurrently": "^9.0.1",
11+
"laravel-vite-plugin": "^2.0.0",
1012
"lodash": "^4.17.19",
1113
"postcss": "^8.4.4",
12-
"tailwindcss": "^3.0.0",
13-
"vite": "^7.0.7",
14-
"laravel-vite-plugin": "^2.0.0",
15-
"concurrently": "^9.0.1"
14+
"tailwindcss": "^4.2.1",
15+
"vite": "^7.0.7"
1616
}
1717
}

postcss.config.js

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

resources/css/app.css

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,57 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import 'tailwindcss';
2+
3+
@theme {
4+
--color-*: initial;
5+
--color-gray-50: #fafafa;
6+
--color-gray-100: #f3f4f6;
7+
--color-gray-200: #e4e4e7;
8+
--color-gray-500: #71717a;
9+
--color-gray-700: #2e3036;
10+
--color-white: #fff;
11+
--color-black: #000;
12+
13+
--color-indigo-50: #eef2ff;
14+
--color-indigo-100: #e0e7ff;
15+
--color-indigo-200: #c7d2fe;
16+
--color-indigo-300: #a5b4fc;
17+
--color-indigo-400: #818cf8;
18+
--color-indigo-500: #6366f1;
19+
--color-indigo-600: #4f46e5;
20+
--color-indigo-700: #4338ca;
21+
--color-indigo-800: #3730a3;
22+
--color-indigo-900: #312e81;
23+
--color-indigo-950: #1e1b4b;
24+
25+
--color-teal-50: #f0fdfa;
26+
--color-teal-100: #ccfbf1;
27+
--color-teal-200: #99f6e4;
28+
--color-teal-300: #5eead4;
29+
--color-teal-400: #2dd4bf;
30+
--color-teal-500: #14b8a6;
31+
--color-teal-600: #0d9488;
32+
--color-teal-700: #0f766e;
33+
--color-teal-800: #115e59;
34+
--color-teal-900: #134e4a;
35+
--color-teal-950: #042f2e;
36+
}
37+
38+
/*
39+
The default border color has changed to `currentcolor` in Tailwind CSS v4,
40+
so we've added these compatibility styles to make sure everything still
41+
looks the same as it did with Tailwind CSS v3.
42+
43+
If we ever want to remove these styles, we need to add an explicit border
44+
color utility to any element that depends on these defaults.
45+
*/
46+
@layer base {
47+
*,
48+
::after,
49+
::before,
50+
::backdrop,
51+
::file-selector-button {
52+
border-color: var(--color-gray-200, currentcolor);
53+
}
54+
}
455

556
.schedule-wrapper svg {
657
max-width: 100%;
@@ -20,11 +71,11 @@
2071
}
2172

2273
.markdown h3 code, .markdown p code {
23-
@apply text-xs bg-gray-700 text-white px-2 py-1 rounded
74+
@apply text-xs bg-gray-700 text-white px-2 py-1 rounded-sm
2475
}
2576

2677
.markdown pre {
27-
@apply text-xs bg-gray-700 p-6 rounded-lg mb-10 lg:max-w-screen-md overflow-x-scroll
78+
@apply text-xs bg-gray-700 p-6 rounded-lg mb-10 lg:max-w-(--breakpoint-md) overflow-x-scroll
2879
}
2980

3081
.markdown pre code {

resources/views/partials/header.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<header class="py-8 bg-gray-700">
2-
<div class="flex flex-col max-w-screen-xl px-4 mx-auto sm:px-6 lg:px-8">
2+
<div class="flex flex-col max-w-(--breakpoint-xl) px-4 mx-auto sm:px-6 lg:px-8">
33

44
<div class="mb-2 mt-4 text-3xl">
55
<a href="/" class="inline-block">
@@ -10,7 +10,7 @@
1010
</a>
1111
</div>
1212
</div>
13-
<div class="max-w-screen-xl px-4 py-4 mx-auto font-light text-base text-white sm:px-6 lg:px-8">
13+
<div class="max-w-(--breakpoint-xl) px-4 py-4 mx-auto font-light text-base text-white sm:px-6 lg:px-8">
1414
<p class="mb-4 md:mb-2">
1515
Provides API endpoints for support information for PHP versions 5.6 and later.
1616
</p>

resources/views/stats.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@section('content')
44
<dl class="grid grid-cols-1 gap-5 mt-5 sm:grid-cols-4">
5-
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow sm:p-6">
5+
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow-sm sm:p-6">
66
<dt class="text-sm font-medium text-gray-500 truncate">Last Week</dt>
77
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">
88
<h3>{{ $week['current'] }} hits</h3>
@@ -11,7 +11,7 @@
1111
</dd>
1212
</div>
1313

14-
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow sm:p-6">
14+
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow-sm sm:p-6">
1515
<dt class="text-sm font-medium text-gray-500 truncate">Last Month</dt>
1616
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">
1717
<h3>{{ $month['current'] }} hits</h3>
@@ -20,7 +20,7 @@
2020
</dd>
2121
</div>
2222

23-
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow sm:p-6">
23+
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow-sm sm:p-6">
2424
<dt class="text-sm font-medium text-gray-500 truncate">All Time</dt>
2525
<dd class="mt-1 text-3xl font-semibold tracking-tight text-gray-900">
2626
<h3>{{ $year['current'] }} hits</h3>
@@ -29,7 +29,7 @@
2929
</dd>
3030
</div>
3131

32-
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow sm:p-6">
32+
<div class="px-4 py-5 overflow-hidden bg-white rounded-lg shadow-sm sm:p-6">
3333
<dt class="text-sm font-medium text-gray-500 truncate">Top Endpoints <span class="text-xs">(All Time)</span></dt>
3434
<dd class="mt-1 text-xs font-semibold tracking-tight text-gray-900">
3535
@foreach ($top as $topHit)

tailwind.config.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)