tribunal-kit 2.4.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/agents/accessibility-reviewer.md +220 -134
- package/.agent/agents/ai-code-reviewer.md +233 -129
- package/.agent/agents/backend-specialist.md +238 -178
- package/.agent/agents/code-archaeologist.md +181 -119
- package/.agent/agents/database-architect.md +207 -164
- package/.agent/agents/debugger.md +218 -151
- package/.agent/agents/dependency-reviewer.md +136 -55
- package/.agent/agents/devops-engineer.md +238 -175
- package/.agent/agents/documentation-writer.md +221 -137
- package/.agent/agents/explorer-agent.md +180 -142
- package/.agent/agents/frontend-reviewer.md +194 -80
- package/.agent/agents/frontend-specialist.md +237 -188
- package/.agent/agents/game-developer.md +52 -184
- package/.agent/agents/logic-reviewer.md +149 -78
- package/.agent/agents/mobile-developer.md +223 -152
- package/.agent/agents/mobile-reviewer.md +195 -79
- package/.agent/agents/orchestrator.md +211 -170
- package/.agent/agents/penetration-tester.md +174 -131
- package/.agent/agents/performance-optimizer.md +203 -139
- package/.agent/agents/performance-reviewer.md +211 -108
- package/.agent/agents/product-manager.md +162 -108
- package/.agent/agents/project-planner.md +162 -142
- package/.agent/agents/qa-automation-engineer.md +242 -138
- package/.agent/agents/security-auditor.md +194 -170
- package/.agent/agents/seo-specialist.md +213 -132
- package/.agent/agents/sql-reviewer.md +194 -73
- package/.agent/agents/supervisor-agent.md +203 -156
- package/.agent/agents/test-coverage-reviewer.md +193 -81
- package/.agent/agents/type-safety-reviewer.md +208 -65
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/skills/agent-organizer/SKILL.md +126 -132
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +155 -66
- package/.agent/skills/api-patterns/SKILL.md +289 -257
- package/.agent/skills/api-security-auditor/SKILL.md +172 -70
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
- package/.agent/skills/appflow-wireframe/SKILL.md +107 -100
- package/.agent/skills/architecture/SKILL.md +331 -200
- package/.agent/skills/authentication-best-practices/SKILL.md +168 -67
- package/.agent/skills/bash-linux/SKILL.md +154 -215
- package/.agent/skills/brainstorming/SKILL.md +104 -210
- package/.agent/skills/building-native-ui/SKILL.md +169 -70
- package/.agent/skills/clean-code/SKILL.md +360 -206
- package/.agent/skills/config-validator/SKILL.md +141 -165
- package/.agent/skills/csharp-developer/SKILL.md +528 -107
- package/.agent/skills/database-design/SKILL.md +455 -275
- package/.agent/skills/deployment-procedures/SKILL.md +145 -188
- package/.agent/skills/devops-engineer/SKILL.md +332 -134
- package/.agent/skills/devops-incident-responder/SKILL.md +113 -98
- package/.agent/skills/edge-computing/SKILL.md +157 -213
- package/.agent/skills/extract-design-system/SKILL.md +129 -69
- package/.agent/skills/framer-motion-expert/SKILL.md +939 -0
- package/.agent/skills/game-design-expert/SKILL.md +105 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +122 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +124 -215
- package/.agent/skills/github-operations/SKILL.md +314 -354
- package/.agent/skills/gsap-expert/SKILL.md +901 -0
- package/.agent/skills/i18n-localization/SKILL.md +138 -216
- package/.agent/skills/intelligent-routing/SKILL.md +127 -139
- package/.agent/skills/llm-engineering/SKILL.md +357 -258
- package/.agent/skills/local-first/SKILL.md +154 -203
- package/.agent/skills/mcp-builder/SKILL.md +118 -224
- package/.agent/skills/nextjs-react-expert/SKILL.md +783 -203
- package/.agent/skills/nodejs-best-practices/SKILL.md +559 -280
- package/.agent/skills/observability/SKILL.md +330 -285
- package/.agent/skills/parallel-agents/SKILL.md +122 -181
- package/.agent/skills/performance-profiling/SKILL.md +254 -197
- package/.agent/skills/plan-writing/SKILL.md +118 -188
- package/.agent/skills/platform-engineer/SKILL.md +123 -135
- package/.agent/skills/playwright-best-practices/SKILL.md +157 -76
- package/.agent/skills/powershell-windows/SKILL.md +146 -230
- package/.agent/skills/python-pro/SKILL.md +879 -114
- package/.agent/skills/react-specialist/SKILL.md +931 -108
- package/.agent/skills/realtime-patterns/SKILL.md +304 -296
- package/.agent/skills/rust-pro/SKILL.md +701 -240
- package/.agent/skills/seo-fundamentals/SKILL.md +154 -181
- package/.agent/skills/server-management/SKILL.md +190 -212
- package/.agent/skills/shadcn-ui-expert/SKILL.md +201 -68
- package/.agent/skills/sql-pro/SKILL.md +633 -104
- package/.agent/skills/swiftui-expert/SKILL.md +171 -70
- package/.agent/skills/systematic-debugging/SKILL.md +118 -186
- package/.agent/skills/tailwind-patterns/SKILL.md +576 -232
- package/.agent/skills/tdd-workflow/SKILL.md +137 -209
- package/.agent/skills/testing-patterns/SKILL.md +573 -205
- package/.agent/skills/vue-expert/SKILL.md +964 -119
- package/.agent/skills/vulnerability-scanner/SKILL.md +269 -316
- package/.agent/skills/web-accessibility-auditor/SKILL.md +188 -71
- package/.agent/skills/webapp-testing/SKILL.md +145 -236
- package/.agent/workflows/api-tester.md +151 -279
- package/.agent/workflows/audit.md +138 -168
- package/.agent/workflows/brainstorm.md +110 -146
- package/.agent/workflows/changelog.md +112 -144
- package/.agent/workflows/create.md +124 -139
- package/.agent/workflows/debug.md +189 -196
- package/.agent/workflows/deploy.md +189 -153
- package/.agent/workflows/enhance.md +151 -139
- package/.agent/workflows/fix.md +135 -143
- package/.agent/workflows/generate.md +157 -164
- package/.agent/workflows/migrate.md +160 -163
- package/.agent/workflows/orchestrate.md +168 -151
- package/.agent/workflows/performance-benchmarker.md +123 -305
- package/.agent/workflows/plan.md +173 -151
- package/.agent/workflows/preview.md +80 -137
- package/.agent/workflows/refactor.md +183 -153
- package/.agent/workflows/review-ai.md +129 -140
- package/.agent/workflows/review.md +116 -155
- package/.agent/workflows/session.md +94 -154
- package/.agent/workflows/status.md +79 -125
- package/.agent/workflows/strengthen-skills.md +139 -99
- package/.agent/workflows/swarm.md +179 -194
- package/.agent/workflows/test.md +211 -166
- package/.agent/workflows/tribunal-backend.md +113 -111
- package/.agent/workflows/tribunal-database.md +115 -132
- package/.agent/workflows/tribunal-frontend.md +118 -115
- package/.agent/workflows/tribunal-full.md +133 -136
- package/.agent/workflows/tribunal-mobile.md +119 -123
- package/.agent/workflows/tribunal-performance.md +133 -152
- package/.agent/workflows/ui-ux-pro-max.md +143 -171
- package/README.md +11 -15
- package/package.json +1 -1
- package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
- package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
- package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/.agent/skills/game-development/SKILL.md +0 -236
- package/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/.agent/skills/game-development/web-games/SKILL.md +0 -150
|
@@ -1,232 +1,576 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tailwind-patterns
|
|
3
|
-
description: Tailwind CSS v4+
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
7
|
-
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Tailwind CSS v4+
|
|
11
|
-
|
|
12
|
-
> Tailwind is
|
|
13
|
-
>
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## v4
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```css
|
|
22
|
-
/*
|
|
23
|
-
@import "tailwindcss";
|
|
24
|
-
|
|
25
|
-
@theme {
|
|
26
|
-
/*
|
|
27
|
-
--
|
|
28
|
-
|
|
29
|
-
--color-
|
|
30
|
-
--color-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
--
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
--
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
@
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
1
|
+
---
|
|
2
|
+
name: tailwind-patterns
|
|
3
|
+
description: Tailwind CSS v4+ mastery. CSS-first configuration, @theme directive, container queries, scroll-driven animations, logical properties, clamp(), fluid typography, responsive design, dark mode, custom variants, component extraction, and performance optimization. Use when styling with Tailwind, building design systems, or optimizing CSS output.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-01
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Tailwind CSS v4+ — CSS-First Mastery
|
|
11
|
+
|
|
12
|
+
> Tailwind v4 is a ground-up rewrite. The config file is gone. JavaScript is gone.
|
|
13
|
+
> Everything is CSS-first. If you're still writing `tailwind.config.js`, you're writing legacy.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## v4 Configuration (CSS-First)
|
|
18
|
+
|
|
19
|
+
### The @theme Directive
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
/* app.css — THE configuration file in Tailwind v4 */
|
|
23
|
+
@import "tailwindcss";
|
|
24
|
+
|
|
25
|
+
@theme {
|
|
26
|
+
/* Colors */
|
|
27
|
+
--color-primary-50: oklch(0.97 0.02 250);
|
|
28
|
+
--color-primary-100: oklch(0.93 0.04 250);
|
|
29
|
+
--color-primary-500: oklch(0.55 0.18 250);
|
|
30
|
+
--color-primary-600: oklch(0.48 0.18 250);
|
|
31
|
+
--color-primary-700: oklch(0.40 0.16 250);
|
|
32
|
+
--color-primary-900: oklch(0.25 0.10 250);
|
|
33
|
+
|
|
34
|
+
--color-surface: oklch(0.99 0.00 0);
|
|
35
|
+
--color-surface-alt: oklch(0.96 0.00 0);
|
|
36
|
+
--color-text: oklch(0.15 0.00 0);
|
|
37
|
+
--color-text-muted: oklch(0.45 0.00 0);
|
|
38
|
+
|
|
39
|
+
/* Typography */
|
|
40
|
+
--font-sans: "Inter", "system-ui", sans-serif;
|
|
41
|
+
--font-mono: "JetBrains Mono", monospace;
|
|
42
|
+
|
|
43
|
+
/* Spacing (extends the default scale) */
|
|
44
|
+
--spacing-18: 4.5rem;
|
|
45
|
+
--spacing-88: 22rem;
|
|
46
|
+
|
|
47
|
+
/* Border radius */
|
|
48
|
+
--radius-pill: 9999px;
|
|
49
|
+
--radius-card: 1rem;
|
|
50
|
+
|
|
51
|
+
/* Shadows */
|
|
52
|
+
--shadow-card: 0 1px 3px oklch(0 0 0 / 0.08), 0 1px 2px oklch(0 0 0 / 0.06);
|
|
53
|
+
--shadow-elevated: 0 10px 25px oklch(0 0 0 / 0.1), 0 4px 10px oklch(0 0 0 / 0.05);
|
|
54
|
+
|
|
55
|
+
/* Animations */
|
|
56
|
+
--animate-fade-in: fade-in 0.3s ease-out;
|
|
57
|
+
--animate-slide-up: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes fade-in {
|
|
61
|
+
from { opacity: 0; }
|
|
62
|
+
to { opacity: 1; }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes slide-up {
|
|
66
|
+
from { opacity: 0; transform: translateY(12px); }
|
|
67
|
+
to { opacity: 1; transform: translateY(0); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ❌ HALLUCINATION TRAP: Tailwind v4 does NOT use tailwind.config.js
|
|
71
|
+
❌ module.exports = { theme: { extend: { ... } } } ← REMOVED in v4
|
|
72
|
+
✅ Use @theme { } directive in your CSS file
|
|
73
|
+
✅ @import "tailwindcss" replaces the three @tailwind directives */
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Dark Mode
|
|
77
|
+
|
|
78
|
+
```css
|
|
79
|
+
/* Tailwind v4 dark mode with @theme */
|
|
80
|
+
@theme {
|
|
81
|
+
--color-surface: oklch(0.99 0.00 0);
|
|
82
|
+
--color-text: oklch(0.15 0.00 0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Dark variant — override variables */
|
|
86
|
+
@variant dark {
|
|
87
|
+
@theme {
|
|
88
|
+
--color-surface: oklch(0.13 0.02 260);
|
|
89
|
+
--color-text: oklch(0.93 0.00 0);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Usage in HTML: */
|
|
94
|
+
/* <div class="bg-surface text-text dark:bg-surface dark:text-text"> */
|
|
95
|
+
/* With the @variant dark override, classes "just work" in dark mode */
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```html
|
|
99
|
+
<!-- Dark mode toggle pattern -->
|
|
100
|
+
<html class="dark">
|
|
101
|
+
<body class="bg-surface text-text transition-colors duration-300">
|
|
102
|
+
<!-- Automatically uses dark @theme values -->
|
|
103
|
+
</body>
|
|
104
|
+
</html>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Custom Variants
|
|
108
|
+
|
|
109
|
+
```css
|
|
110
|
+
/* @variant — custom selector-based variants */
|
|
111
|
+
@variant scrolled (&:where([data-scrolled]));
|
|
112
|
+
@variant hocus (&:hover, &:focus-visible);
|
|
113
|
+
|
|
114
|
+
/* Usage: */
|
|
115
|
+
/* <nav class="scrolled:shadow-elevated hocus:ring-2"> */
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Layout Patterns
|
|
121
|
+
|
|
122
|
+
### Flexbox
|
|
123
|
+
|
|
124
|
+
```html
|
|
125
|
+
<!-- Centered hero -->
|
|
126
|
+
<section class="flex min-h-svh flex-col items-center justify-center gap-6 px-6">
|
|
127
|
+
<h1 class="text-5xl font-bold tracking-tight">Hero Title</h1>
|
|
128
|
+
<p class="max-w-2xl text-center text-lg text-text-muted">Subtitle text</p>
|
|
129
|
+
<div class="flex gap-3">
|
|
130
|
+
<button class="rounded-pill bg-primary-600 px-6 py-3 text-white">Primary</button>
|
|
131
|
+
<button class="rounded-pill border border-primary-600 px-6 py-3 text-primary-600">Secondary</button>
|
|
132
|
+
</div>
|
|
133
|
+
</section>
|
|
134
|
+
|
|
135
|
+
<!-- Sidebar layout -->
|
|
136
|
+
<div class="flex min-h-svh">
|
|
137
|
+
<aside class="w-64 shrink-0 border-r border-gray-200 p-4">Sidebar</aside>
|
|
138
|
+
<main class="flex-1 overflow-y-auto p-6">Content</main>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<!-- ❌ HALLUCINATION TRAP: Use min-h-svh (small viewport height), NOT min-h-screen
|
|
142
|
+
min-h-screen = 100vh (broken on mobile — includes browser chrome)
|
|
143
|
+
min-h-svh = 100svh (accounts for mobile browser chrome)
|
|
144
|
+
min-h-dvh = 100dvh (dynamic — updates as chrome shows/hides) -->
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### CSS Grid
|
|
148
|
+
|
|
149
|
+
```html
|
|
150
|
+
<!-- Auto-fit responsive grid (no breakpoints needed) -->
|
|
151
|
+
<div class="grid grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-6">
|
|
152
|
+
<div class="rounded-card bg-surface p-6 shadow-card">Card 1</div>
|
|
153
|
+
<div class="rounded-card bg-surface p-6 shadow-card">Card 2</div>
|
|
154
|
+
<div class="rounded-card bg-surface p-6 shadow-card">Card 3</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<!-- Dashboard grid with named areas -->
|
|
158
|
+
<div class="grid grid-cols-[240px_1fr] grid-rows-[64px_1fr] min-h-svh">
|
|
159
|
+
<header class="col-span-2 border-b">Header</header>
|
|
160
|
+
<aside class="border-r p-4">Sidebar</aside>
|
|
161
|
+
<main class="overflow-y-auto p-6">Content</main>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<!-- Bento grid -->
|
|
165
|
+
<div class="grid auto-rows-[180px] grid-cols-3 gap-4">
|
|
166
|
+
<div class="col-span-2 row-span-2 rounded-2xl bg-primary-100">Large</div>
|
|
167
|
+
<div class="rounded-2xl bg-surface-alt">Small 1</div>
|
|
168
|
+
<div class="rounded-2xl bg-surface-alt">Small 2</div>
|
|
169
|
+
<div class="col-span-3 rounded-2xl bg-primary-50">Full width</div>
|
|
170
|
+
</div>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Container Queries
|
|
174
|
+
|
|
175
|
+
```html
|
|
176
|
+
<!-- Container queries — component-level responsiveness -->
|
|
177
|
+
<div class="@container">
|
|
178
|
+
<div class="flex flex-col gap-3 @sm:flex-row @sm:items-center @lg:gap-6">
|
|
179
|
+
<img class="size-16 rounded-full @sm:size-20" src="avatar.jpg" alt="">
|
|
180
|
+
<div>
|
|
181
|
+
<h3 class="text-lg font-semibold @lg:text-xl">User Name</h3>
|
|
182
|
+
<p class="text-sm text-text-muted @lg:text-base">Description</p>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<!-- Named container -->
|
|
188
|
+
<div class="@container/card">
|
|
189
|
+
<div class="@md/card:grid @md/card:grid-cols-2">
|
|
190
|
+
<!-- Responds to the card container's width, not viewport -->
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<!-- ❌ HALLUCINATION TRAP: Container queries use @sm, @md, @lg (with @ prefix)
|
|
195
|
+
NOT sm:, md:, lg: — those are VIEWPORT breakpoints
|
|
196
|
+
@sm = container >= 320px (component-level)
|
|
197
|
+
sm: = viewport >= 640px (page-level) -->
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Typography
|
|
203
|
+
|
|
204
|
+
### Fluid Typography with clamp()
|
|
205
|
+
|
|
206
|
+
```html
|
|
207
|
+
<!-- Fluid heading — scales smoothly from 2rem to 4rem -->
|
|
208
|
+
<h1 class="text-[clamp(2rem,5vw,4rem)] font-bold leading-tight tracking-tight">
|
|
209
|
+
Responsive Heading
|
|
210
|
+
</h1>
|
|
211
|
+
|
|
212
|
+
<!-- Fluid body text -->
|
|
213
|
+
<p class="text-[clamp(1rem,1.2vw,1.25rem)] leading-relaxed text-text-muted">
|
|
214
|
+
Body text that scales with viewport
|
|
215
|
+
</p>
|
|
216
|
+
|
|
217
|
+
<!-- Prose (for long-form content) -->
|
|
218
|
+
<article class="prose prose-lg mx-auto max-w-3xl dark:prose-invert">
|
|
219
|
+
<!-- @tailwindcss/typography plugin handles all typography -->
|
|
220
|
+
<h1>Article Title</h1>
|
|
221
|
+
<p>Paragraph with <a href="#">links</a> and <code>code</code>.</p>
|
|
222
|
+
</article>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Font Loading
|
|
226
|
+
|
|
227
|
+
```css
|
|
228
|
+
/* @font-face in your CSS (Tailwind v4 approach) */
|
|
229
|
+
@font-face {
|
|
230
|
+
font-family: "Inter";
|
|
231
|
+
font-weight: 100 900;
|
|
232
|
+
font-display: swap;
|
|
233
|
+
src: url("/fonts/inter-variable.woff2") format("woff2");
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@theme {
|
|
237
|
+
--font-sans: "Inter", system-ui, sans-serif;
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Component Patterns
|
|
244
|
+
|
|
245
|
+
### Button System
|
|
246
|
+
|
|
247
|
+
```html
|
|
248
|
+
<!-- Base button with variants -->
|
|
249
|
+
<button class="inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
|
|
250
|
+
text-sm font-medium transition-all duration-150
|
|
251
|
+
focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500
|
|
252
|
+
active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50">
|
|
253
|
+
Button Text
|
|
254
|
+
</button>
|
|
255
|
+
|
|
256
|
+
<!-- Primary variant -->
|
|
257
|
+
<button class="... bg-primary-600 text-white shadow-sm hover:bg-primary-700">Primary</button>
|
|
258
|
+
|
|
259
|
+
<!-- Ghost variant -->
|
|
260
|
+
<button class="... text-text hover:bg-gray-100 dark:hover:bg-gray-800">Ghost</button>
|
|
261
|
+
|
|
262
|
+
<!-- Destructive variant -->
|
|
263
|
+
<button class="... bg-red-600 text-white hover:bg-red-700">Delete</button>
|
|
264
|
+
|
|
265
|
+
<!-- Icon button -->
|
|
266
|
+
<button class="grid size-10 place-items-center rounded-lg hover:bg-gray-100"
|
|
267
|
+
aria-label="Settings">
|
|
268
|
+
<svg class="size-5" ...></svg>
|
|
269
|
+
</button>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Input System
|
|
273
|
+
|
|
274
|
+
```html
|
|
275
|
+
<!-- Text input -->
|
|
276
|
+
<div class="space-y-1.5">
|
|
277
|
+
<label for="email" class="text-sm font-medium text-text">Email</label>
|
|
278
|
+
<input id="email" type="email" placeholder="you@example.com"
|
|
279
|
+
class="w-full rounded-lg border border-gray-300 bg-surface px-3.5 py-2.5
|
|
280
|
+
text-sm text-text placeholder:text-text-muted
|
|
281
|
+
transition-colors duration-150
|
|
282
|
+
focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20
|
|
283
|
+
disabled:cursor-not-allowed disabled:bg-gray-50 disabled:opacity-60"
|
|
284
|
+
/>
|
|
285
|
+
<p class="text-xs text-red-500">Error message here</p>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
<!-- Checkbox -->
|
|
289
|
+
<label class="flex items-center gap-2.5 text-sm">
|
|
290
|
+
<input type="checkbox"
|
|
291
|
+
class="size-4 rounded border-gray-300 text-primary-600
|
|
292
|
+
focus:ring-2 focus:ring-primary-500/20" />
|
|
293
|
+
Remember me
|
|
294
|
+
</label>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Card Pattern
|
|
298
|
+
|
|
299
|
+
```html
|
|
300
|
+
<div class="group overflow-hidden rounded-card bg-surface shadow-card
|
|
301
|
+
transition-shadow duration-200 hover:shadow-elevated">
|
|
302
|
+
<div class="aspect-video overflow-hidden bg-gray-100">
|
|
303
|
+
<img src="cover.jpg" alt="Cover"
|
|
304
|
+
class="size-full object-cover transition-transform duration-300
|
|
305
|
+
group-hover:scale-105" />
|
|
306
|
+
</div>
|
|
307
|
+
<div class="space-y-2 p-5">
|
|
308
|
+
<span class="inline-block rounded-full bg-primary-100 px-2.5 py-0.5
|
|
309
|
+
text-xs font-medium text-primary-700">Category</span>
|
|
310
|
+
<h3 class="text-lg font-semibold text-text line-clamp-2">Card Title</h3>
|
|
311
|
+
<p class="text-sm text-text-muted line-clamp-3">Description text...</p>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Modal / Dialog
|
|
317
|
+
|
|
318
|
+
```html
|
|
319
|
+
<!-- Backdrop -->
|
|
320
|
+
<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/50
|
|
321
|
+
backdrop-blur-sm animate-fade-in">
|
|
322
|
+
<!-- Modal -->
|
|
323
|
+
<div class="w-full max-w-md rounded-2xl bg-surface p-6 shadow-elevated animate-slide-up"
|
|
324
|
+
role="dialog" aria-modal="true" aria-labelledby="modal-title">
|
|
325
|
+
<h2 id="modal-title" class="text-lg font-semibold">Dialog Title</h2>
|
|
326
|
+
<p class="mt-2 text-sm text-text-muted">Dialog description.</p>
|
|
327
|
+
|
|
328
|
+
<div class="mt-6 flex justify-end gap-3">
|
|
329
|
+
<button class="rounded-lg px-4 py-2 text-sm hover:bg-gray-100">Cancel</button>
|
|
330
|
+
<button class="rounded-lg bg-primary-600 px-4 py-2 text-sm text-white
|
|
331
|
+
hover:bg-primary-700">Confirm</button>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Responsive Design Rules
|
|
340
|
+
|
|
341
|
+
```html
|
|
342
|
+
<!-- Tailwind breakpoints (mobile-first) -->
|
|
343
|
+
<!-- sm: 640px │ md: 768px │ lg: 1024px │ xl: 1280px │ 2xl: 1536px -->
|
|
344
|
+
|
|
345
|
+
<!-- Stack on mobile, row on tablet+ -->
|
|
346
|
+
<div class="flex flex-col gap-4 md:flex-row md:items-center">
|
|
347
|
+
<div class="md:w-1/2">Left</div>
|
|
348
|
+
<div class="md:w-1/2">Right</div>
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
<!-- Hide/show at breakpoints -->
|
|
352
|
+
<nav class="hidden lg:flex">Desktop nav</nav>
|
|
353
|
+
<button class="lg:hidden">☰ Mobile menu</button>
|
|
354
|
+
|
|
355
|
+
<!-- Responsive padding -->
|
|
356
|
+
<section class="px-4 py-12 sm:px-6 lg:px-8 lg:py-24">
|
|
357
|
+
<div class="mx-auto max-w-7xl">Content</div>
|
|
358
|
+
</section>
|
|
359
|
+
|
|
360
|
+
<!-- Responsive grid -->
|
|
361
|
+
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
|
|
362
|
+
<!-- Cards -->
|
|
363
|
+
</div>
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Animations & Transitions
|
|
369
|
+
|
|
370
|
+
### Transition Utilities
|
|
371
|
+
|
|
372
|
+
```html
|
|
373
|
+
<!-- Smooth hover transitions -->
|
|
374
|
+
<a class="text-text-muted transition-colors duration-150 hover:text-primary-600">Link</a>
|
|
375
|
+
|
|
376
|
+
<!-- Transform transitions -->
|
|
377
|
+
<div class="transition-transform duration-300 hover:-translate-y-1 hover:scale-105">
|
|
378
|
+
Hover me
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
<!-- Combined transition -->
|
|
382
|
+
<button class="rounded-lg bg-primary-600 px-4 py-2 text-white
|
|
383
|
+
transition-all duration-200
|
|
384
|
+
hover:bg-primary-700 hover:shadow-lg
|
|
385
|
+
active:scale-95">
|
|
386
|
+
Click me
|
|
387
|
+
</button>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Custom Keyframe Animations
|
|
391
|
+
|
|
392
|
+
```css
|
|
393
|
+
@theme {
|
|
394
|
+
--animate-bounce-in: bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
395
|
+
--animate-spin-slow: spin 3s linear infinite;
|
|
396
|
+
--animate-pulse-soft: pulse-soft 2s ease-in-out infinite;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@keyframes bounce-in {
|
|
400
|
+
0% { opacity: 0; transform: scale(0.3); }
|
|
401
|
+
50% { transform: scale(1.05); }
|
|
402
|
+
70% { transform: scale(0.9); }
|
|
403
|
+
100% { opacity: 1; transform: scale(1); }
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@keyframes pulse-soft {
|
|
407
|
+
0%, 100% { opacity: 1; }
|
|
408
|
+
50% { opacity: 0.7; }
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Scroll-Driven Animations (CSS Native)
|
|
413
|
+
|
|
414
|
+
```css
|
|
415
|
+
/* Progress bar that fills as user scrolls */
|
|
416
|
+
.scroll-progress {
|
|
417
|
+
animation: grow-width linear;
|
|
418
|
+
animation-timeline: scroll();
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
@keyframes grow-width {
|
|
422
|
+
from { transform: scaleX(0); }
|
|
423
|
+
to { transform: scaleX(1); }
|
|
424
|
+
}
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
```html
|
|
428
|
+
<div class="scroll-progress fixed top-0 left-0 z-50 h-1 w-full origin-left bg-primary-600"></div>
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Performance
|
|
434
|
+
|
|
435
|
+
### Purging & Bundle Size
|
|
436
|
+
|
|
437
|
+
```css
|
|
438
|
+
/* Tailwind v4 automatically tree-shakes unused CSS at build time */
|
|
439
|
+
/* No manual purge configuration needed */
|
|
440
|
+
|
|
441
|
+
/* @source — explicitly add content paths for scanning */
|
|
442
|
+
@source "../components/**/*.tsx";
|
|
443
|
+
@source "../pages/**/*.tsx";
|
|
444
|
+
|
|
445
|
+
/* ❌ HALLUCINATION TRAP: Tailwind v4 does NOT use purge: [] config
|
|
446
|
+
❌ purge: ['./src/**/*.{html,tsx}'] ← REMOVED in v4
|
|
447
|
+
✅ Uses automatic content detection based on your project structure
|
|
448
|
+
✅ Use @source directive for custom paths */
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Avoiding Bloat
|
|
452
|
+
|
|
453
|
+
```html
|
|
454
|
+
<!-- ✅ GOOD: Use component extraction for repeated patterns -->
|
|
455
|
+
<!-- Create a .btn class in CSS instead of repeating 15 utilities -->
|
|
456
|
+
|
|
457
|
+
<!-- ❌ BAD: One-off arbitrary values everywhere -->
|
|
458
|
+
<div class="mt-[13px] mr-[7px] p-[11px] text-[15px]">
|
|
459
|
+
<!-- Every arbitrary value = unique CSS rule = bundle bloat -->
|
|
460
|
+
</div>
|
|
461
|
+
|
|
462
|
+
<!-- ✅ GOOD: Use your design scale -->
|
|
463
|
+
<div class="mt-3 mr-2 p-3 text-sm">
|
|
464
|
+
<!-- Maps to existing utilities = zero extra CSS -->
|
|
465
|
+
</div>
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### Component Extraction (When to @apply)
|
|
469
|
+
|
|
470
|
+
```css
|
|
471
|
+
/* Use @apply ONLY for highly reused component patterns */
|
|
472
|
+
/* Do NOT @apply everything — it defeats Tailwind's purpose */
|
|
473
|
+
|
|
474
|
+
.btn {
|
|
475
|
+
@apply inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
|
|
476
|
+
text-sm font-medium transition-all duration-150
|
|
477
|
+
focus-visible:outline-2 focus-visible:outline-offset-2
|
|
478
|
+
active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.btn-primary {
|
|
482
|
+
@apply btn bg-primary-600 text-white shadow-sm hover:bg-primary-700
|
|
483
|
+
focus-visible:outline-primary-500;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* ❌ HALLUCINATION TRAP: @apply is for component patterns shared across files
|
|
487
|
+
If a pattern appears in only 1-2 places, just use inline utilities
|
|
488
|
+
Over-extracting with @apply = recreating regular CSS with extra steps */
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## Accessibility with Tailwind
|
|
494
|
+
|
|
495
|
+
```html
|
|
496
|
+
<!-- Focus visible (keyboard only, not mouse click) -->
|
|
497
|
+
<a class="rounded-lg focus-visible:outline-2 focus-visible:outline-primary-500
|
|
498
|
+
focus-visible:outline-offset-2">
|
|
499
|
+
Keyboard accessible link
|
|
500
|
+
</a>
|
|
501
|
+
|
|
502
|
+
<!-- Screen reader only text -->
|
|
503
|
+
<button>
|
|
504
|
+
<svg class="size-5" aria-hidden="true"></svg>
|
|
505
|
+
<span class="sr-only">Close menu</span>
|
|
506
|
+
</button>
|
|
507
|
+
|
|
508
|
+
<!-- Motion-safe / motion-reduce -->
|
|
509
|
+
<div class="motion-safe:animate-bounce-in motion-reduce:animate-none">
|
|
510
|
+
<!-- Only animates if user hasn't enabled "reduce motion" -->
|
|
511
|
+
</div>
|
|
512
|
+
|
|
513
|
+
<!-- Forced colors mode (high contrast) -->
|
|
514
|
+
<button class="bg-primary-600 forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]">
|
|
515
|
+
Accessible button
|
|
516
|
+
</button>
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
## Output Format
|
|
522
|
+
|
|
523
|
+
```
|
|
524
|
+
━━━ Tailwind Expert Report ━━━━━━━━━━━━━━━━━━━━━━━
|
|
525
|
+
Skill: Tailwind Patterns
|
|
526
|
+
Tailwind: v4+
|
|
527
|
+
Scope: [N files · N components]
|
|
528
|
+
─────────────────────────────────────────────────
|
|
529
|
+
✅ Passed: [checks that passed, or "All clean"]
|
|
530
|
+
⚠️ Warnings: [non-blocking issues, or "None"]
|
|
531
|
+
❌ Blocked: [blocking issues requiring fix, or "None"]
|
|
532
|
+
─────────────────────────────────────────────────
|
|
533
|
+
VBC status: PENDING → VERIFIED
|
|
534
|
+
Evidence: [build output / visual verification]
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## 🤖 LLM-Specific Traps
|
|
540
|
+
|
|
541
|
+
1. **`tailwind.config.js` in v4:** There is NO JavaScript config file in Tailwind v4. All configuration is CSS-first with `@theme {}`.
|
|
542
|
+
2. **`@tailwind base/components/utilities`:** Replaced by `@import "tailwindcss"` — a single import.
|
|
543
|
+
3. **`purge:` Configuration:** Tailwind v4 auto-detects content files. No purge config exists.
|
|
544
|
+
4. **`min-h-screen` on Mobile:** 100vh is broken on mobile browsers. Use `min-h-svh` (100svh) or `min-h-dvh` (100dvh).
|
|
545
|
+
5. **`@sm` vs `sm:`:** `@sm` = container query (width of parent). `sm:` = viewport breakpoint. They are NOT interchangeable.
|
|
546
|
+
6. **Arbitrary Value Overuse:** `mt-[13px]` generates a unique CSS rule. Use the spacing scale (`mt-3`) whenever possible.
|
|
547
|
+
7. **`@apply` for Everything:** Over-extracting utilities into `@apply` classes defeats Tailwind's purpose. Only extract highly reused patterns.
|
|
548
|
+
8. **Non-oklch Colors:** Tailwind v4 uses oklch for its default palette. Defining custom colors in hex/rgb limits color manipulation.
|
|
549
|
+
9. **Missing `font-display: swap`:** Custom `@font-face` rules without `font-display: swap` cause FOIT (Flash of Invisible Text).
|
|
550
|
+
10. **Ignoring `forced-colors`:** High-contrast mode overrides all colors. Interactive elements MUST have `forced-colors:` fallbacks.
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
## 🏛️ Tribunal Integration
|
|
555
|
+
|
|
556
|
+
**Slash command: `/tribunal-frontend`**
|
|
557
|
+
|
|
558
|
+
### ✅ Pre-Flight Self-Audit
|
|
559
|
+
|
|
560
|
+
```
|
|
561
|
+
✅ Did I use @theme {} (not tailwind.config.js)?
|
|
562
|
+
✅ Did I use @import "tailwindcss" (not @tailwind directives)?
|
|
563
|
+
✅ Did I use min-h-svh/dvh (not min-h-screen)?
|
|
564
|
+
✅ Did I use the design scale (not arbitrary values)?
|
|
565
|
+
✅ Did I use oklch for custom colors?
|
|
566
|
+
✅ Did I add focus-visible styles to all interactive elements?
|
|
567
|
+
✅ Did I add sr-only labels to icon-only buttons?
|
|
568
|
+
✅ Did I use motion-safe/motion-reduce for animations?
|
|
569
|
+
✅ Did I use @container/@sm for component-level responsiveness?
|
|
570
|
+
✅ Does the CSS build without warnings?
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### 🛑 VBC Protocol
|
|
574
|
+
|
|
575
|
+
- ❌ **Forbidden:** Assuming Tailwind classes work without building.
|
|
576
|
+
- ✅ **Required:** Provide build output or visual screenshot evidence.
|