Skip to content

Commit f743ee8

Browse files
committed
Stuff and things
1 parent e5e6ec3 commit f743ee8

40 files changed

Lines changed: 522 additions & 537 deletions

.agents/skills/tailwindcss-development/SKILL.md

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tailwindcss-development
3-
description: "Styles applications using Tailwind CSS v3 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes."
3+
description: "Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes."
44
license: MIT
55
metadata:
66
author: laravel
@@ -11,6 +11,7 @@ metadata:
1111
## When to Apply
1212

1313
Activate this skill when:
14+
1415
- Adding styles to components or pages
1516
- Working with responsive design
1617
- Implementing dark mode
@@ -19,30 +20,63 @@ Activate this skill when:
1920

2021
## Documentation
2122

22-
Use `search-docs` for detailed Tailwind CSS v3 patterns and documentation.
23+
Use `search-docs` for detailed Tailwind CSS v4 patterns and documentation.
2324

2425
## Basic Usage
2526

2627
- Use Tailwind CSS classes to style HTML. Check and follow existing Tailwind conventions in the project before introducing new patterns.
2728
- Offer to extract repeated patterns into components that match the project's conventions (e.g., Blade, JSX, Vue).
2829
- Consider class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child elements carefully to reduce repetition, and group elements logically.
2930

30-
## Tailwind CSS v3 Specifics
31+
## Tailwind CSS v4 Specifics
32+
33+
- Always use Tailwind CSS v4 and avoid deprecated utilities.
34+
- `corePlugins` is not supported in Tailwind v4.
35+
36+
### CSS-First Configuration
3137

32-
- Always use Tailwind CSS v3 and verify you're using only classes it supports.
33-
- Configuration is done in the `tailwind.config.js` file.
34-
- Import using `@tailwind` directives:
38+
In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed:
3539

36-
<!-- v3 Import Syntax -->
40+
<!-- CSS-First Config -->
3741
```css
38-
@tailwind base;
39-
@tailwind components;
40-
@tailwind utilities;
42+
@theme {
43+
--color-brand: oklch(0.72 0.11 178);
44+
}
45+
```
46+
47+
### Import Syntax
48+
49+
In Tailwind v4, import Tailwind with a regular CSS `@import` statement instead of the `@tailwind` directives used in v3:
50+
51+
<!-- v4 Import Syntax -->
52+
```diff
53+
- @tailwind base;
54+
- @tailwind components;
55+
- @tailwind utilities;
56+
+ @import "tailwindcss";
4157
```
4258

59+
### Replaced Utilities
60+
61+
Tailwind v4 removed deprecated utilities. Use the replacements shown below. Opacity values remain numeric.
62+
63+
| Deprecated | Replacement |
64+
|------------|-------------|
65+
| bg-opacity-* | bg-black/* |
66+
| text-opacity-* | text-black/* |
67+
| border-opacity-* | border-black/* |
68+
| divide-opacity-* | divide-black/* |
69+
| ring-opacity-* | ring-black/* |
70+
| placeholder-opacity-* | placeholder-black/* |
71+
| flex-shrink-* | shrink-* |
72+
| flex-grow-* | grow-* |
73+
| overflow-ellipsis | text-ellipsis |
74+
| decoration-slice | box-decoration-slice |
75+
| decoration-clone | box-decoration-clone |
76+
4377
## Spacing
4478

45-
When listing items, use gap utilities for spacing; don't use margins.
79+
Use `gap` utilities instead of margins for spacing between siblings:
4680

4781
<!-- Gap Utilities -->
4882
```html
@@ -86,15 +120,10 @@ If existing pages and components support dark mode, new pages and components mus
86120
</div>
87121
```
88122

89-
## Verification
90-
91-
1. Check browser for visual rendering
92-
2. Test responsive breakpoints
93-
3. Verify dark mode if project uses it
94-
95123
## Common Pitfalls
96124

125+
- Using deprecated v3 utilities (bg-opacity-*, flex-shrink-*, etc.)
126+
- Using `@tailwind` directives instead of `@import "tailwindcss"`
127+
- Trying to use `tailwind.config.js` instead of CSS `@theme` directive
97128
- Using margins for spacing between siblings instead of gap utilities
98-
- Forgetting to add dark mode variants when the project uses dark mode
99-
- Not checking existing project conventions before adding new utilities
100-
- Overusing inline styles when Tailwind classes would suffice
129+
- Forgetting to add dark mode variants when the project uses dark mode

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ This application is a Laravel application and its main Laravel ecosystems packag
2323
- vue (VUE) - v3
2424
- eslint (ESLINT) - v9
2525
- prettier (PRETTIER) - v2
26-
- tailwindcss (TAILWINDCSS) - v3
26+
- tailwindcss (TAILWINDCSS) - v4
2727

2828
## Skills Activation
2929

3030
This project has domain-specific skills available. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck.
3131

3232
- `pest-testing` — Tests applications using the Pest 3 PHP framework. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, architecture testing, debugging test failures, working with datasets or mocking; or when the user mentions test, spec, TDD, expects, assertion, coverage, or needs to verify functionality works.
33-
- `tailwindcss-development` — Styles applications using Tailwind CSS v3 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes.
33+
- `tailwindcss-development` — Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes.
3434

3535
## Conventions
3636

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
"@iconify-json/ph": "^1.1.12",
4747
"@rollup/rollup-darwin-x64": "^4.58.0",
4848
"@tailwindcss/forms": "^0.5.3",
49+
"@tailwindcss/postcss": "^4.2.0",
4950
"@tailwindcss/typography": "^0.5.9",
5051
"@types/js-cookie": "^3.0.6",
5152
"@types/lodash": "^4.14.195",
5253
"@types/node": "^20.2.5",
5354
"@typescript-eslint/eslint-plugin": "^8.46.2",
5455
"@typescript-eslint/parser": "^8.46.2",
5556
"@vue/runtime-core": "^3.3.4",
56-
"autoprefixer": "^10.4.14",
5757
"eslint": "^9.38.0",
5858
"eslint-config-prettier": "^10.1.8",
5959
"eslint-plugin-prettier": "^5.5.4",
@@ -62,8 +62,8 @@
6262
"postcss": "^8.4.24",
6363
"postcss-nested": "^6.0.1",
6464
"prettier": "^2.8.8",
65-
"prettier-plugin-tailwindcss": "^0.2.8",
66-
"tailwindcss": "^3.3.2",
65+
"prettier-plugin-tailwindcss": "^0.7.2",
66+
"tailwindcss": "^4.2.0",
6767
"typescript": "^5.1.3",
6868
"unplugin-icons": "^0.18.5",
6969
"vite": "^6.0.0",
@@ -72,9 +72,7 @@
7272
},
7373
"postcss": {
7474
"plugins": {
75-
"tailwindcss/nesting": {},
76-
"autoprefixer": {},
77-
"tailwindcss": {}
75+
"@tailwindcss/postcss": {}
7876
}
7977
}
8078
}

0 commit comments

Comments
 (0)