Skip to content

Commit cc59798

Browse files
authored
Upgrade Tailwindcss to v4 (alexjustesen#2383)
Co-authored-by: Alex Justesen <[email protected]>
1 parent c9d04bd commit cc59798

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+889
-1838
lines changed

.github/copilot-instructions.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
2020
- laravel/telescope (TELESCOPE) - v5
2121
- pestphp/pest (PEST) - v3
2222
- phpunit/phpunit (PHPUNIT) - v11
23-
- tailwindcss (TAILWINDCSS) - v3
23+
- tailwindcss (TAILWINDCSS) - v4
2424

2525
## Conventions
2626
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, naming.
@@ -455,11 +455,39 @@ it('has emails', function (string $email) {
455455
- If existing pages and components support dark mode, new pages and components must support dark mode in a similar way, typically using `dark:`.
456456
457457
458-
=== tailwindcss/v3 rules ===
458+
=== tailwindcss/v4 rules ===
459459
460-
## Tailwind 3
460+
## Tailwind 4
461461
462-
- Always use Tailwind CSS v3 - verify you're using only classes supported by this version.
462+
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
463+
- `corePlugins` is not supported in Tailwind v4.
464+
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:
465+
466+
<code-snippet name="Tailwind v4 Import Tailwind Diff" lang="diff">
467+
- @tailwind base;
468+
- @tailwind components;
469+
- @tailwind utilities;
470+
+ @import "tailwindcss";
471+
</code-snippet>
472+
473+
474+
### Replaced Utilities
475+
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option - use the replacement.
476+
- Opacity values are still numeric.
477+
478+
| Deprecated | Replacement |
479+
|------------+--------------|
480+
| bg-opacity-* | bg-black/* |
481+
| text-opacity-* | text-black/* |
482+
| border-opacity-* | border-black/* |
483+
| divide-opacity-* | divide-black/* |
484+
| ring-opacity-* | ring-black/* |
485+
| placeholder-opacity-* | placeholder-black/* |
486+
| flex-shrink-* | shrink-* |
487+
| flex-grow-* | grow-* |
488+
| overflow-ellipsis | text-ellipsis |
489+
| decoration-slice | box-decoration-slice |
490+
| decoration-clone | box-decoration-clone |
463491
464492
465493
=== tests rules ===

CLAUDE.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
2020
- laravel/telescope (TELESCOPE) - v5
2121
- pestphp/pest (PEST) - v3
2222
- phpunit/phpunit (PHPUNIT) - v11
23-
- tailwindcss (TAILWINDCSS) - v3
23+
- tailwindcss (TAILWINDCSS) - v4
2424

2525
## Conventions
2626
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, naming.
@@ -455,11 +455,39 @@ it('has emails', function (string $email) {
455455
- If existing pages and components support dark mode, new pages and components must support dark mode in a similar way, typically using `dark:`.
456456
457457
458-
=== tailwindcss/v3 rules ===
458+
=== tailwindcss/v4 rules ===
459459
460-
## Tailwind 3
460+
## Tailwind 4
461461
462-
- Always use Tailwind CSS v3 - verify you're using only classes supported by this version.
462+
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
463+
- `corePlugins` is not supported in Tailwind v4.
464+
- In Tailwind v4, you import Tailwind using a regular CSS `@import` statement, not using the `@tailwind` directives used in v3:
465+
466+
<code-snippet name="Tailwind v4 Import Tailwind Diff" lang="diff">
467+
- @tailwind base;
468+
- @tailwind components;
469+
- @tailwind utilities;
470+
+ @import "tailwindcss";
471+
</code-snippet>
472+
473+
474+
### Replaced Utilities
475+
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option - use the replacement.
476+
- Opacity values are still numeric.
477+
478+
| Deprecated | Replacement |
479+
|------------+--------------|
480+
| bg-opacity-* | bg-black/* |
481+
| text-opacity-* | text-black/* |
482+
| border-opacity-* | border-black/* |
483+
| divide-opacity-* | divide-black/* |
484+
| ring-opacity-* | ring-black/* |
485+
| placeholder-opacity-* | placeholder-black/* |
486+
| flex-shrink-* | shrink-* |
487+
| flex-grow-* | grow-* |
488+
| overflow-ellipsis | text-ellipsis |
489+
| decoration-slice | box-decoration-slice |
490+
| decoration-clone | box-decoration-clone |
463491
464492
465493
=== tests rules ===

app/Providers/Filament/AdminPanelProvider.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace App\Providers\Filament;
44

55
use App\Services\GitHub\Repository;
6-
use Filament\FontProviders\LocalFontProvider;
76
use Filament\Http\Middleware\Authenticate;
87
use Filament\Http\Middleware\DisableBladeIconComponents;
98
use Filament\Http\Middleware\DispatchServingFilamentEvent;
@@ -34,11 +33,6 @@ public function panel(Panel $panel): Panel
3433
'primary' => Color::Amber,
3534
])
3635
->favicon(asset('img/speedtest-tracker-icon.png'))
37-
->font(
38-
'Inter',
39-
url: asset('fonts/inter/inter.css'),
40-
provider: LocalFontProvider::class,
41-
)
4236
->sidebarCollapsibleOnDesktop()
4337
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
4438
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')

0 commit comments

Comments
 (0)