···
1
+
# Tailwind CSS v4 LLM Development Guidelines
3
+
You are an expert web developer specializing in Tailwind CSS v4. Follow these guidelines when writing code or providing recommendations.
7
+
Tailwind CSS v4 is a complete rewrite with a new high-performance Oxide engine, CSS-first configuration, and modern web platform features. It requires modern browsers (Safari 16.4+, Chrome 111+, Firefox 128+) and is NOT compatible with older browsers.
9
+
## Installation & Setup
14
+
@import "tailwindcss";
20
+
import { defineConfig } from 'vite'
21
+
import tailwindcss from '@tailwindcss/vite'
23
+
export default defineConfig({
24
+
plugins: [tailwindcss()]
28
+
### Package Installation
30
+
npm install tailwindcss@next @tailwindcss/vite@next
33
+
## Configuration (CSS-First)
35
+
**IMPORTANT**: v4 uses CSS-first configuration, NOT JavaScript config files. Use the `@theme` directive in your CSS file:
38
+
@import "tailwindcss";
41
+
/* Colors (use OKLCH for wider gamut) */
42
+
--color-brand-50: oklch(0.98 0.01 142.12);
43
+
--color-brand-500: oklch(0.64 0.15 142.12);
44
+
--color-brand-900: oklch(0.25 0.08 142.12);
47
+
--font-display: "Satoshi", "Inter", sans-serif;
48
+
--font-body: "Inter", system-ui, sans-serif;
51
+
--spacing-18: 4.5rem;
52
+
--spacing-72: 18rem;
55
+
--breakpoint-3xl: 1920px;
56
+
--breakpoint-4xl: 2560px;
59
+
--shadow-brutal: 8px 8px 0px 0px #000;
62
+
--animate-wiggle: wiggle 1s ease-in-out infinite;
65
+
/* Define keyframes for animations */
67
+
0%, 100% { transform: rotate(-3deg); }
68
+
50% { transform: rotate(3deg); }
72
+
### Legacy Config Support (if needed)
74
+
@import "tailwindcss";
75
+
@config "./tailwind.config.js";
78
+
## Breaking Changes from v3
81
+
- ❌ `@tailwind base; @tailwind components; @tailwind utilities;`
82
+
- ✅ `@import "tailwindcss";`
84
+
### Removed Utilities
85
+
- `text-opacity-*` → Use `text-{color}/{opacity}` instead
86
+
- `bg-opacity-*` → Use `bg-{color}/{opacity}` instead
87
+
- `border-opacity-*` → Use `border-{color}/{opacity}` instead
88
+
- `flex-grow-*` → Use `grow-*`
89
+
- `flex-shrink-*` → Use `shrink-*`
90
+
- `decoration-slice` → Use `box-decoration-slice`
92
+
### Renamed Utilities
93
+
- `shadow-sm` → `shadow-xs`
94
+
- `rounded-sm` → `rounded-xs`
95
+
- `blur-sm` → `blur-xs`
96
+
- `bg-gradient-*` → `bg-linear-*`
98
+
### Default Behavior Changes
99
+
- **Border**: No longer defaults to gray-200, uses `currentColor`
100
+
- **Ring**: Changed from 3px blue to 1px `currentColor`
101
+
- **Outline**: Now 1px by default for consistency
103
+
## Custom Utilities
105
+
Use the `@utility` directive instead of `@layer utilities`:
109
+
padding: 0.5rem 1rem;
110
+
border-radius: 0.375rem;
112
+
transition: all 0.2s;
115
+
@utility btn-primary {
116
+
background: var(--color-blue-600);
120
+
background: var(--color-blue-700);
124
+
/* Functional utilities with parameters */
125
+
@utility margin-auto {
129
+
@utility flex-center {
131
+
justify-content: center;
132
+
align-items: center;
139
+
@custom-variant theme-dark {
140
+
&:where([data-theme="dark"] *) {
145
+
@custom-variant any-hover {
146
+
@media (any-hover: hover) {
154
+
## New Features in v4
156
+
### Container Queries (Built-in)
158
+
<div class="@container">
159
+
<div class="grid grid-cols-1 @sm:grid-cols-2 @lg:grid-cols-3">
160
+
<div class="@min-w-64:text-lg @max-w-96:bg-blue-100">
161
+
Responsive to container size
169
+
<div class="perspective-1000">
170
+
<div class="rotate-x-45 rotate-y-12 scale-z-110 translate-z-24 transform-3d">
171
+
3D transformed element
176
+
### Enhanced Gradients
178
+
<!-- Linear gradients with angles -->
179
+
<div class="bg-linear-45 from-blue-500 to-purple-500"></div>
181
+
<!-- Radial gradients -->
182
+
<div class="bg-radial from-red-500 via-yellow-500 to-orange-500"></div>
184
+
<!-- Conic gradients -->
185
+
<div class="bg-conic from-pink-500 via-blue-500 to-green-500"></div>
190
+
<h1 class="text-shadow-lg text-shadow-blue-500/50">
191
+
Text with colored shadow
197
+
<div class="mask-radial mask-cover">
198
+
<img src="image.jpg" alt="Masked image" />
204
+
#### @starting-style (for animations)
206
+
<div class="opacity-100 @starting-style:opacity-0 transition-opacity">
207
+
Animates in on mount
213
+
<div class="bg-blue-500 not-hover:bg-gray-500">
214
+
Blue except when hovering
218
+
#### nth-* variants
220
+
<div class="nth-2:bg-red-500 nth-odd:bg-blue-500">
227
+
<div class="inert:opacity-50 inert:pointer-events-none">
232
+
#### in-* variant (like group-* but without group class)
235
+
<h2 class="in-article:text-lg">Styled when inside article</h2>
239
+
### Modern Color System
240
+
v4 uses OKLCH color space for wider gamut support:
244
+
--color-brand-primary: oklch(0.7 0.15 180);
245
+
--color-brand-accent: oklch(0.8 0.2 45);
249
+
## Multi-Theme Strategy
252
+
@import "tailwindcss";
255
+
--color-primary: oklch(0.5 0.2 240);
256
+
--color-background: oklch(0.98 0.01 240);
260
+
[data-theme='dark'] {
261
+
--color-primary: oklch(0.7 0.2 240);
262
+
--color-background: oklch(0.15 0.02 240);
265
+
[data-theme='high-contrast'] {
266
+
--color-primary: oklch(0.0 0 0);
267
+
--color-background: oklch(1.0 0 0);
274
+
### 1. Use CSS Variables for Dynamic Values
276
+
<div class="bg-[var(--dynamic-color)] text-[var(--dynamic-size)]">
281
+
### 2. Leverage the New Color System
283
+
<!-- Better contrast and vibrancy with OKLCH -->
284
+
<div class="bg-blue-500 text-white">
285
+
Vivid colors on modern displays
289
+
### 3. Container Queries for True Responsive Design
291
+
<div class="@container">
292
+
<div class="p-4 @lg:p-8 @xl:p-12">
293
+
Responds to container, not viewport
298
+
### 4. Modern CSS Features
300
+
<!-- Native cascade layers -->
301
+
<div class="layer-[utilities]:z-10">
302
+
Proper layer management
305
+
<!-- Color mixing -->
306
+
<div class="bg-blue-500/50">
307
+
Uses color-mix() under the hood
311
+
## Performance Optimizations
313
+
v4's Oxide engine provides:
314
+
- 5x faster full builds
315
+
- 100x faster incremental builds
316
+
- Automatic content detection
317
+
- Built-in import handling
318
+
- Native vendor prefixing
320
+
## File Organization
325
+
│ ├── main.css # @import "tailwindcss" + @theme
326
+
│ ├── components.css # @utility definitions
327
+
│ └── utilities.css # Additional @utility definitions
329
+
└── *.vue/jsx/html # Your components
334
+
### Theme-aware Components
337
+
background: var(--color-background);
338
+
border: 1px solid var(--color-border);
339
+
border-radius: 0.5rem;
341
+
box-shadow: var(--shadow-sm);
345
+
### Responsive Typography
347
+
<h1 class="text-2xl @sm:text-3xl @lg:text-4xl @xl:text-5xl">
348
+
Container-responsive heading
352
+
### Animation with @starting-style
354
+
<div class="translate-y-0 @starting-style:translate-y-full transition-transform duration-500">
361
+
1. **Use browser dev tools** to inspect CSS variables
362
+
2. **Check cascade layers** in dev tools
363
+
3. **Verify modern browser support** for OKLCH colors
364
+
4. **Use @reference** for CSS modules/component styles
365
+
5. **Restart dev server** after major theme changes
367
+
## Migration from v3
369
+
1. Replace `@tailwind` directives with `@import "tailwindcss"`
370
+
2. Move config from JS to CSS using `@theme`
371
+
3. Update deprecated utility classes
372
+
4. Replace `@layer utilities` with `@utility`
373
+
5. Test in modern browsers only
374
+
6. Use the official upgrade tool: `npx @tailwindcss/upgrade@next`
376
+
## Complete Utility Class Reference
382
+
block, inline-block, inline, flex, inline-flex, table, inline-table, table-caption, table-cell, table-column, table-column-group, table-footer-group, table-header-group, table-row-group, table-row, flow-root, grid, inline-grid, contents, list-item, hidden
387
+
static, fixed, absolute, relative, sticky
390
+
#### Top/Right/Bottom/Left
392
+
inset-0, inset-x-0, inset-y-0, start-0, end-0, top-0, right-0, bottom-0, left-0
393
+
inset-px, inset-x-px, inset-y-px, start-px, end-px, top-px, right-px, bottom-px, left-px
394
+
inset-0.5, inset-1, inset-1.5, inset-2, inset-2.5, inset-3, inset-3.5, inset-4, inset-5, inset-6, inset-7, inset-8, inset-9, inset-10, inset-11, inset-12, inset-14, inset-16, inset-20, inset-24, inset-28, inset-32, inset-36, inset-40, inset-44, inset-48, inset-52, inset-56, inset-60, inset-64, inset-72, inset-80, inset-96
395
+
inset-auto, inset-1/2, inset-1/3, inset-2/3, inset-1/4, inset-2/4, inset-3/4, inset-full
398
+
#### Visibility & Z-Index
400
+
visible, invisible, collapse
401
+
z-0, z-10, z-20, z-30, z-40, z-50, z-auto
406
+
overflow-auto, overflow-hidden, overflow-clip, overflow-visible, overflow-scroll
407
+
overflow-x-auto, overflow-x-hidden, overflow-x-clip, overflow-x-visible, overflow-x-scroll
408
+
overflow-y-auto, overflow-y-hidden, overflow-y-clip, overflow-y-visible, overflow-y-scroll
413
+
#### Flex Direction
415
+
flex-row, flex-row-reverse, flex-col, flex-col-reverse
420
+
flex-wrap, flex-wrap-reverse, flex-nowrap
425
+
flex-1, flex-auto, flex-initial, flex-none
430
+
grow, grow-0, shrink, shrink-0
435
+
order-1, order-2, order-3, order-4, order-5, order-6, order-7, order-8, order-9, order-10, order-11, order-12, order-first, order-last, order-none
438
+
#### Grid Template Columns
440
+
grid-cols-1, grid-cols-2, grid-cols-3, grid-cols-4, grid-cols-5, grid-cols-6, grid-cols-7, grid-cols-8, grid-cols-9, grid-cols-10, grid-cols-11, grid-cols-12, grid-cols-none, grid-cols-subgrid
443
+
#### Grid Column Start/End
445
+
col-auto, col-span-1, col-span-2, col-span-3, col-span-4, col-span-5, col-span-6, col-span-7, col-span-8, col-span-9, col-span-10, col-span-11, col-span-12, col-span-full
446
+
col-start-1, col-start-2, col-start-3, col-start-4, col-start-5, col-start-6, col-start-7, col-start-8, col-start-9, col-start-10, col-start-11, col-start-12, col-start-13, col-start-auto
447
+
col-end-1, col-end-2, col-end-3, col-end-4, col-end-5, col-end-6, col-end-7, col-end-8, col-end-9, col-end-10, col-end-11, col-end-12, col-end-13, col-end-auto
450
+
#### Grid Template Rows
452
+
grid-rows-1, grid-rows-2, grid-rows-3, grid-rows-4, grid-rows-5, grid-rows-6, grid-rows-7, grid-rows-8, grid-rows-9, grid-rows-10, grid-rows-11, grid-rows-12, grid-rows-none, grid-rows-subgrid
455
+
#### Grid Row Start/End
457
+
row-auto, row-span-1, row-span-2, row-span-3, row-span-4, row-span-5, row-span-6, row-span-7, row-span-8, row-span-9, row-span-10, row-span-11, row-span-12, row-span-full
458
+
row-start-1, row-start-2, row-start-3, row-start-4, row-start-5, row-start-6, row-start-7, row-start-8, row-start-9, row-start-10, row-start-11, row-start-12, row-start-13, row-start-auto
459
+
row-end-1, row-end-2, row-end-3, row-end-4, row-end-5, row-end-6, row-end-7, row-end-8, row-end-9, row-end-10, row-end-11, row-end-12, row-end-13, row-end-auto
464
+
gap-0, gap-x-0, gap-y-0, gap-px, gap-x-px, gap-y-px
465
+
gap-0.5, gap-1, gap-1.5, gap-2, gap-2.5, gap-3, gap-3.5, gap-4, gap-5, gap-6, gap-7, gap-8, gap-9, gap-10, gap-11, gap-12, gap-14, gap-16, gap-20, gap-24, gap-28, gap-32, gap-36, gap-40, gap-44, gap-48, gap-52, gap-56, gap-60, gap-64, gap-72, gap-80, gap-96
468
+
#### Justify & Align
470
+
justify-normal, justify-start, justify-end, justify-center, justify-between, justify-around, justify-evenly, justify-stretch
471
+
justify-items-start, justify-items-end, justify-items-center, justify-items-stretch
472
+
justify-self-auto, justify-self-start, justify-self-end, justify-self-center, justify-self-stretch
473
+
align-items-start, align-items-end, align-items-center, align-items-baseline, align-items-stretch
474
+
align-content-normal, align-content-center, align-content-start, align-content-end, align-content-between, align-content-around, align-content-evenly, align-content-baseline, align-content-stretch
475
+
align-self-auto, align-self-start, align-self-end, align-self-center, align-self-stretch, align-self-baseline
476
+
place-content-center, place-content-start, place-content-end, place-content-between, place-content-around, place-content-evenly, place-content-baseline, place-content-stretch
477
+
place-items-start, place-items-end, place-items-center, place-items-baseline, place-items-stretch
478
+
place-self-auto, place-self-start, place-self-end, place-self-center, place-self-stretch
485
+
p-0, p-px, p-0.5, p-1, p-1.5, p-2, p-2.5, p-3, p-3.5, p-4, p-5, p-6, p-7, p-8, p-9, p-10, p-11, p-12, p-14, p-16, p-20, p-24, p-28, p-32, p-36, p-40, p-44, p-48, p-52, p-56, p-60, p-64, p-72, p-80, p-96
486
+
px-0, py-0, pl-0, pr-0, pt-0, pb-0, ps-0, pe-0
491
+
m-0, m-px, m-0.5, m-1, m-1.5, m-2, m-2.5, m-3, m-3.5, m-4, m-5, m-6, m-7, m-8, m-9, m-10, m-11, m-12, m-14, m-16, m-20, m-24, m-28, m-32, m-36, m-40, m-44, m-48, m-52, m-56, m-60, m-64, m-72, m-80, m-96, m-auto
492
+
mx-0, my-0, ml-0, mr-0, mt-0, mb-0, ms-0, me-0
493
+
-m-0, -m-px, -m-0.5, -m-1, -m-1.5, -m-2, -m-2.5, -m-3, -m-3.5, -m-4, -m-5, -m-6, -m-7, -m-8, -m-9, -m-10, -m-11, -m-12, -m-14, -m-16, -m-20, -m-24, -m-28, -m-32, -m-36, -m-40, -m-44, -m-48, -m-52, -m-56, -m-60, -m-64, -m-72, -m-80, -m-96
498
+
space-x-0, space-x-px, space-x-0.5, space-x-1, space-x-1.5, space-x-2, space-x-2.5, space-x-3, space-x-3.5, space-x-4, space-x-5, space-x-6, space-x-7, space-x-8, space-x-9, space-x-10, space-x-11, space-x-12, space-x-14, space-x-16, space-x-20, space-x-24, space-x-28, space-x-32, space-x-36, space-x-40, space-x-44, space-x-48, space-x-52, space-x-56, space-x-60, space-x-64, space-x-72, space-x-80, space-x-96, space-x-reverse
499
+
space-y-0, space-y-px, space-y-0.5, space-y-1, space-y-1.5, space-y-2, space-y-2.5, space-y-3, space-y-3.5, space-y-4, space-y-5, space-y-6, space-y-7, space-y-8, space-y-9, space-y-10, space-y-11, space-y-12, space-y-14, space-y-16, space-y-20, space-y-24, space-y-28, space-y-32, space-y-36, space-y-40, space-y-44, space-y-48, space-y-52, space-y-56, space-y-60, space-y-64, space-y-72, space-y-80, space-y-96, space-y-reverse
506
+
w-0, w-px, w-0.5, w-1, w-1.5, w-2, w-2.5, w-3, w-3.5, w-4, w-5, w-6, w-7, w-8, w-9, w-10, w-11, w-12, w-14, w-16, w-20, w-24, w-28, w-32, w-36, w-40, w-44, w-48, w-52, w-56, w-60, w-64, w-72, w-80, w-96, w-auto, w-1/2, w-1/3, w-2/3, w-1/4, w-2/4, w-3/4, w-1/5, w-2/5, w-3/5, w-4/5, w-1/6, w-2/6, w-3/6, w-4/6, w-5/6, w-1/12, w-2/12, w-3/12, w-4/12, w-5/12, w-6/12, w-7/12, w-8/12, w-9/12, w-10/12, w-11/12, w-full, w-screen, w-svw, w-lvw, w-dvw, w-min, w-max, w-fit
511
+
h-0, h-px, h-0.5, h-1, h-1.5, h-2, h-2.5, h-3, h-3.5, h-4, h-5, h-6, h-7, h-8, h-9, h-10, h-11, h-12, h-14, h-16, h-20, h-24, h-28, h-32, h-36, h-40, h-44, h-48, h-52, h-56, h-60, h-64, h-72, h-80, h-96, h-auto, h-1/2, h-1/3, h-2/3, h-1/4, h-2/4, h-3/4, h-1/5, h-2/5, h-3/5, h-4/5, h-1/6, h-2/6, h-3/6, h-4/6, h-5/6, h-full, h-screen, h-svh, h-lvh, h-dvh, h-min, h-max, h-fit
514
+
#### Size (Width + Height)
516
+
size-0, size-px, size-0.5, size-1, size-1.5, size-2, size-2.5, size-3, size-3.5, size-4, size-5, size-6, size-7, size-8, size-9, size-10, size-11, size-12, size-14, size-16, size-20, size-24, size-28, size-32, size-36, size-40, size-44, size-48, size-52, size-56, size-60, size-64, size-72, size-80, size-96, size-auto, size-1/2, size-1/3, size-2/3, size-1/4, size-2/4, size-3/4, size-1/5, size-2/5, size-3/5, size-4/5, size-1/6, size-2/6, size-3/6, size-4/6, size-5/6, size-1/12, size-2/12, size-3/12, size-4/12, size-5/12, size-6/12, size-7/12, size-8/12, size-9/12, size-10/12, size-11/12, size-full, size-min, size-max, size-fit
521
+
min-w-0, min-w-full, min-w-min, min-w-max, min-w-fit
522
+
max-w-0, max-w-xs, max-w-sm, max-w-md, max-w-lg, max-w-xl, max-w-2xl, max-w-3xl, max-w-4xl, max-w-5xl, max-w-6xl, max-w-7xl, max-w-full, max-w-min, max-w-max, max-w-fit, max-w-prose, max-w-screen-sm, max-w-screen-md, max-w-screen-lg, max-w-screen-xl, max-w-screen-2xl
525
+
#### Min/Max Height
527
+
min-h-0, min-h-full, min-h-screen, min-h-svh, min-h-lvh, min-h-dvh, min-h-min, min-h-max, min-h-fit
528
+
max-h-0, max-h-px, max-h-0.5, max-h-1, max-h-1.5, max-h-2, max-h-2.5, max-h-3, max-h-3.5, max-h-4, max-h-5, max-h-6, max-h-7, max-h-8, max-h-9, max-h-10, max-h-11, max-h-12, max-h-14, max-h-16, max-h-20, max-h-24, max-h-28, max-h-32, max-h-36, max-h-40, max-h-44, max-h-48, max-h-52, max-h-56, max-h-60, max-h-64, max-h-72, max-h-80, max-h-96, max-h-full, max-h-screen, max-h-svh, max-h-lvh, max-h-dvh, max-h-min, max-h-max, max-h-fit
535
+
font-sans, font-serif, font-mono
540
+
text-xs, text-sm, text-base, text-lg, text-xl, text-2xl, text-3xl, text-4xl, text-5xl, text-6xl, text-7xl, text-8xl, text-9xl
545
+
font-thin, font-extralight, font-light, font-normal, font-medium, font-semibold, font-bold, font-extrabold, font-black
553
+
#### Font Variant Numeric
555
+
normal-nums, ordinal, slashed-zero, lining-nums, oldstyle-nums, proportional-nums, tabular-nums, diagonal-fractions, stacked-fractions
558
+
#### Font Stretch (NEW in v4)
560
+
font-stretch-ultra-condensed, font-stretch-extra-condensed, font-stretch-condensed, font-stretch-semi-condensed, font-stretch-normal, font-stretch-semi-expanded, font-stretch-expanded, font-stretch-extra-expanded, font-stretch-ultra-expanded
563
+
#### Letter Spacing
565
+
tracking-tighter, tracking-tight, tracking-normal, tracking-wide, tracking-wider, tracking-widest
570
+
line-clamp-1, line-clamp-2, line-clamp-3, line-clamp-4, line-clamp-5, line-clamp-6, line-clamp-none
575
+
leading-3, leading-4, leading-5, leading-6, leading-7, leading-8, leading-9, leading-10, leading-none, leading-tight, leading-snug, leading-normal, leading-relaxed, leading-loose
580
+
list-none, list-disc, list-decimal, list-inside, list-outside
585
+
text-left, text-center, text-right, text-justify, text-start, text-end
590
+
text-inherit, text-current, text-transparent, text-black, text-white
591
+
text-slate-50, text-slate-100, text-slate-200, text-slate-300, text-slate-400, text-slate-500, text-slate-600, text-slate-700, text-slate-800, text-slate-900, text-slate-950
592
+
text-gray-50, text-gray-100, text-gray-200, text-gray-300, text-gray-400, text-gray-500, text-gray-600, text-gray-700, text-gray-800, text-gray-900, text-gray-950
593
+
text-zinc-50, text-zinc-100, text-zinc-200, text-zinc-300, text-zinc-400, text-zinc-500, text-zinc-600, text-zinc-700, text-zinc-800, text-zinc-900, text-zinc-950
594
+
text-neutral-50, text-neutral-100, text-neutral-200, text-neutral-300, text-neutral-400, text-neutral-500, text-neutral-600, text-neutral-700, text-neutral-800, text-neutral-900, text-neutral-950
595
+
text-stone-50, text-stone-100, text-stone-200, text-stone-300, text-stone-400, text-stone-500, text-stone-600, text-stone-700, text-stone-800, text-stone-900, text-stone-950
596
+
text-red-50, text-red-100, text-red-200, text-red-300, text-red-400, text-red-500, text-red-600, text-red-700, text-red-800, text-red-900, text-red-950
597
+
text-orange-50, text-orange-100, text-orange-200, text-orange-300, text-orange-400, text-orange-500, text-orange-600, text-orange-700, text-orange-800, text-orange-900, text-orange-950
598
+
text-amber-50, text-amber-100, text-amber-200, text-amber-300, text-amber-400, text-amber-500, text-amber-600, text-amber-700, text-amber-800, text-amber-900, text-amber-950
599
+
text-yellow-50, text-yellow-100, text-yellow-200, text-yellow-300, text-yellow-400, text-yellow-500, text-yellow-600, text-yellow-700, text-yellow-800, text-yellow-900, text-yellow-950
600
+
text-lime-50, text-lime-100, text-lime-200, text-lime-300, text-lime-400, text-lime-500, text-lime-600, text-lime-700, text-lime-800, text-lime-900, text-lime-950
601
+
text-green-50, text-green-100, text-green-200, text-green-300, text-green-400, text-green-500, text-green-600, text-green-700, text-green-800, text-green-900, text-green-950
602
+
text-emerald-50, text-emerald-100, text-emerald-200, text-emerald-300, text-emerald-400, text-emerald-500, text-emerald-600, text-emerald-700, text-emerald-800, text-emerald-900, text-emerald-950
603
+
text-teal-50, text-teal-100, text-teal-200, text-teal-300, text-teal-400, text-teal-500, text-teal-600, text-teal-700, text-teal-800, text-teal-900, text-teal-950
604
+
text-cyan-50, text-cyan-100, text-cyan-200, text-cyan-300, text-cyan-400, text-cyan-500, text-cyan-600, text-cyan-700, text-cyan-800, text-cyan-900, text-cyan-950
605
+
text-sky-50, text-sky-100, text-sky-200, text-sky-300, text-sky-400, text-sky-500, text-sky-600, text-sky-700, text-sky-800, text-sky-900, text-sky-950
606
+
text-blue-50, text-blue-100, text-blue-200, text-blue-300, text-blue-400, text-blue-500, text-blue-600, text-blue-700, text-blue-800, text-blue-900, text-blue-950
607
+
text-indigo-50, text-indigo-100, text-indigo-200, text-indigo-300, text-indigo-400, text-indigo-500, text-indigo-600, text-indigo-700, text-indigo-800, text-indigo-900, text-indigo-950
608
+
text-violet-50, text-violet-100, text-violet-200, text-violet-300, text-violet-400, text-violet-500, text-violet-600, text-violet-700, text-violet-800, text-violet-900, text-violet-950
609
+
text-purple-50, text-purple-100, text-purple-200, text-purple-300, text-purple-400, text-purple-500, text-purple-600, text-purple-700, text-purple-800, text-purple-900, text-purple-950
610
+
text-fuchsia-50, text-fuchsia-100, text-fuchsia-200, text-fuchsia-300, text-fuchsia-400, text-fuchsia-500, text-fuchsia-600, text-fuchsia-700, text-fuchsia-800, text-fuchsia-900, text-fuchsia-950
611
+
text-pink-50, text-pink-100, text-pink-200, text-pink-300, text-pink-400, text-pink-500, text-pink-600, text-pink-700, text-pink-800, text-pink-900, text-pink-950
612
+
text-rose-50, text-rose-100, text-rose-200, text-rose-300, text-rose-400, text-rose-500, text-rose-600, text-rose-700, text-rose-800, text-rose-900, text-rose-950
615
+
#### Text Decoration
617
+
underline, overline, line-through, no-underline
618
+
decoration-solid, decoration-double, decoration-dotted, decoration-dashed, decoration-wavy
619
+
decoration-auto, decoration-from-font, decoration-0, decoration-1, decoration-2, decoration-4, decoration-8
620
+
underline-offset-auto, underline-offset-0, underline-offset-1, underline-offset-2, underline-offset-4, underline-offset-8
623
+
#### Text Transform
625
+
uppercase, lowercase, capitalize, normal-case
630
+
truncate, text-ellipsis, text-clip
633
+
#### Text Shadow (NEW in v4)
635
+
text-shadow-sm, text-shadow, text-shadow-lg, text-shadow-xl, text-shadow-none
638
+
#### Overflow Wrap (NEW in v4)
640
+
overflow-wrap-normal, overflow-wrap-break-word, overflow-wrap-anywhere
643
+
#### Vertical Align
645
+
align-baseline, align-top, align-middle, align-bottom, align-text-top, align-text-bottom, align-sub, align-super
650
+
whitespace-normal, whitespace-nowrap, whitespace-pre, whitespace-pre-line, whitespace-pre-wrap, whitespace-break-spaces
655
+
break-normal, break-words, break-all, break-keep
660
+
hyphens-none, hyphens-manual, hyphens-auto
670
+
#### Background Attachment
672
+
bg-fixed, bg-local, bg-scroll
675
+
#### Background Clip
677
+
bg-clip-border, bg-clip-padding, bg-clip-content, bg-clip-text
680
+
#### Background Color
681
+
All color utilities work with `bg-` prefix (same as text colors above)
683
+
#### Background Origin
685
+
bg-origin-border, bg-origin-padding, bg-origin-content
688
+
#### Background Position
690
+
bg-bottom, bg-center, bg-left, bg-left-bottom, bg-left-top, bg-right, bg-right-bottom, bg-right-top, bg-top
693
+
#### Background Repeat
695
+
bg-repeat, bg-no-repeat, bg-repeat-x, bg-repeat-y, bg-repeat-round, bg-repeat-space
698
+
#### Background Size
700
+
bg-auto, bg-cover, bg-contain
703
+
#### Background Image
706
+
bg-linear-to-t, bg-linear-to-tr, bg-linear-to-r, bg-linear-to-br, bg-linear-to-b, bg-linear-to-bl, bg-linear-to-l, bg-linear-to-tl
709
+
#### Enhanced Gradients (NEW in v4)
711
+
bg-linear-0, bg-linear-45, bg-linear-90, bg-linear-135, bg-linear-180, bg-linear-225, bg-linear-270, bg-linear-315
712
+
bg-radial, bg-radial-at-t, bg-radial-at-tr, bg-radial-at-r, bg-radial-at-br, bg-radial-at-b, bg-radial-at-bl, bg-radial-at-l, bg-radial-at-tl, bg-radial-at-c
713
+
bg-conic, bg-conic-at-t, bg-conic-at-tr, bg-conic-at-r, bg-conic-at-br, bg-conic-at-b, bg-conic-at-bl, bg-conic-at-l, bg-conic-at-tl, bg-conic-at-c
716
+
#### Gradient Color Stops
718
+
from-inherit, from-current, from-transparent, from-black, from-white, from-{color}
719
+
via-inherit, via-current, via-transparent, via-black, via-white, via-{color}
720
+
to-inherit, to-current, to-transparent, to-black, to-white, to-{color}
727
+
rounded-none, rounded-xs, rounded-sm, rounded, rounded-md, rounded-lg, rounded-xl, rounded-2xl, rounded-3xl, rounded-full
728
+
rounded-s-none, rounded-s-xs, rounded-s-sm, rounded-s, rounded-s-md, rounded-s-lg, rounded-s-xl, rounded-s-2xl, rounded-s-3xl
729
+
rounded-e-none, rounded-e-xs, rounded-e-sm, rounded-e, rounded-e-md, rounded-e-lg, rounded-e-xl, rounded-e-2xl, rounded-e-3xl
730
+
rounded-t-none, rounded-t-xs, rounded-t-sm, rounded-t, rounded-t-md, rounded-t-lg, rounded-t-xl, rounded-t-2xl, rounded-t-3xl
731
+
rounded-r-none, rounded-r-xs, rounded-r-sm, rounded-r, rounded-r-md, rounded-r-lg, rounded-r-xl, rounded-r-2xl, rounded-r-3xl
732
+
rounded-b-none, rounded-b-xs, rounded-b-sm, rounded-b, rounded-b-md, rounded-b-lg, rounded-b-xl, rounded-b-2xl, rounded-b-3xl
733
+
rounded-l-none, rounded-l-xs, rounded-l-sm, rounded-l, rounded-l-md, rounded-l-lg, rounded-l-xl, rounded-l-2xl, rounded-l-3xl
734
+
rounded-ss-none, rounded-ss-xs, rounded-ss-sm, rounded-ss, rounded-ss-md, rounded-ss-lg, rounded-ss-xl, rounded-ss-2xl, rounded-ss-3xl
735
+
rounded-se-none, rounded-se-xs, rounded-se-sm, rounded-se, rounded-se-md, rounded-se-lg, rounded-se-xl, rounded-se-2xl, rounded-se-3xl
736
+
rounded-ee-none, rounded-ee-xs, rounded-ee-sm, rounded-ee, rounded-ee-md, rounded-ee-lg, rounded-ee-xl, rounded-ee-2xl, rounded-ee-3xl
737
+
rounded-es-none, rounded-es-xs, rounded-es-sm, rounded-es, rounded-es-md, rounded-es-lg, rounded-es-xl, rounded-es-2xl, rounded-es-3xl
738
+
rounded-tl-none, rounded-tl-xs, rounded-tl-sm, rounded-tl, rounded-tl-md, rounded-tl-lg, rounded-tl-xl, rounded-tl-2xl, rounded-tl-3xl
739
+
rounded-tr-none, rounded-tr-xs, rounded-tr-sm, rounded-tr, rounded-tr-md, rounded-tr-lg, rounded-tr-xl, rounded-tr-2xl, rounded-tr-3xl
740
+
rounded-br-none, rounded-br-xs, rounded-br-sm, rounded-br, rounded-br-md, rounded-br-lg, rounded-br-xl, rounded-br-2xl, rounded-br-3xl
741
+
rounded-bl-none, rounded-bl-xs, rounded-bl-sm, rounded-bl, rounded-bl-md, rounded-bl-lg, rounded-bl-xl, rounded-bl-2xl, rounded-bl-3xl
746
+
border-0, border-2, border-4, border-8, border, border-x, border-y, border-s, border-e, border-t, border-r, border-b, border-l
750
+
All color utilities work with `border-` prefix (same as text/bg colors)
754
+
border-solid, border-dashed, border-dotted, border-double, border-hidden, border-none
759
+
divide-x-0, divide-x-2, divide-x-4, divide-x-8, divide-x, divide-y-0, divide-y-2, divide-y-4, divide-y-8, divide-y, divide-x-reverse, divide-y-reverse
763
+
All color utilities work with `divide-` prefix
767
+
divide-solid, divide-dashed, divide-dotted, divide-double, divide-none
772
+
outline-0, outline-1, outline-2, outline-4, outline-8
776
+
All color utilities work with `outline-` prefix
780
+
outline-none, outline, outline-dashed, outline-dotted, outline-double
783
+
#### Outline Offset
785
+
outline-offset-0, outline-offset-1, outline-offset-2, outline-offset-4, outline-offset-8
790
+
ring-0, ring-1, ring-2, ring, ring-4, ring-8, ring-inset
794
+
All color utilities work with `ring-` prefix
796
+
#### Ring Offset Width
798
+
ring-offset-0, ring-offset-1, ring-offset-2, ring-offset-4, ring-offset-8
801
+
#### Ring Offset Color
802
+
All color utilities work with `ring-offset-` prefix
808
+
shadow-xs, shadow-sm, shadow, shadow-md, shadow-lg, shadow-xl, shadow-2xl, shadow-inner, shadow-none
811
+
#### Box Shadow Color
812
+
All color utilities work with `shadow-` prefix
814
+
#### Drop Shadow (NEW colored support in v4)
816
+
drop-shadow-sm, drop-shadow, drop-shadow-md, drop-shadow-lg, drop-shadow-xl, drop-shadow-2xl, drop-shadow-none
821
+
opacity-0, opacity-5, opacity-10, opacity-15, opacity-20, opacity-25, opacity-30, opacity-35, opacity-40, opacity-45, opacity-50, opacity-55, opacity-60, opacity-65, opacity-70, opacity-75, opacity-80, opacity-85, opacity-90, opacity-95, opacity-100
824
+
#### Mix Blend Mode
826
+
mix-blend-normal, mix-blend-multiply, mix-blend-screen, mix-blend-overlay, mix-blend-darken, mix-blend-lighten, mix-blend-color-dodge, mix-blend-color-burn, mix-blend-hard-light, mix-blend-soft-light, mix-blend-difference, mix-blend-exclusion, mix-blend-hue, mix-blend-saturation, mix-blend-color, mix-blend-luminosity, mix-blend-plus-darker, mix-blend-plus-lighter
829
+
#### Background Blend Mode
831
+
bg-blend-normal, bg-blend-multiply, bg-blend-screen, bg-blend-overlay, bg-blend-darken, bg-blend-lighten, bg-blend-color-dodge, bg-blend-color-burn, bg-blend-hard-light, bg-blend-soft-light, bg-blend-difference, bg-blend-exclusion, bg-blend-hue, bg-blend-saturation, bg-blend-color, bg-blend-luminosity
838
+
blur-none, blur-xs, blur-sm, blur, blur-md, blur-lg, blur-xl, blur-2xl, blur-3xl
843
+
brightness-0, brightness-50, brightness-75, brightness-90, brightness-95, brightness-100, brightness-105, brightness-110, brightness-125, brightness-150, brightness-200
848
+
contrast-0, contrast-50, contrast-75, contrast-100, contrast-125, contrast-150, contrast-200
853
+
grayscale-0, grayscale
858
+
hue-rotate-0, hue-rotate-15, hue-rotate-30, hue-rotate-60, hue-rotate-90, hue-rotate-180, -hue-rotate-180, -hue-rotate-90, -hue-rotate-60, -hue-rotate-30, -hue-rotate-15
868
+
saturate-0, saturate-50, saturate-100, saturate-150, saturate-200
878
+
backdrop-blur-none, backdrop-blur-xs, backdrop-blur-sm, backdrop-blur, backdrop-blur-md, backdrop-blur-lg, backdrop-blur-xl, backdrop-blur-2xl, backdrop-blur-3xl
881
+
#### Backdrop Brightness
883
+
backdrop-brightness-0, backdrop-brightness-50, backdrop-brightness-75, backdrop-brightness-90, backdrop-brightness-95, backdrop-brightness-100, backdrop-brightness-105, backdrop-brightness-110, backdrop-brightness-125, backdrop-brightness-150, backdrop-brightness-200
886
+
#### Backdrop Contrast
888
+
backdrop-contrast-0, backdrop-contrast-50, backdrop-contrast-75, backdrop-contrast-100, backdrop-contrast-125, backdrop-contrast-150, backdrop-contrast-200
891
+
#### Backdrop Grayscale
893
+
backdrop-grayscale-0, backdrop-grayscale
896
+
#### Backdrop Hue Rotate
898
+
backdrop-hue-rotate-0, backdrop-hue-rotate-15, backdrop-hue-rotate-30, backdrop-hue-rotate-60, backdrop-hue-rotate-90, backdrop-hue-rotate-180, -backdrop-hue-rotate-180, -backdrop-hue-rotate-90, -backdrop-hue-rotate-60, -backdrop-hue-rotate-30, -backdrop-hue-rotate-15
901
+
#### Backdrop Invert
903
+
backdrop-invert-0, backdrop-invert
906
+
#### Backdrop Saturate
908
+
backdrop-saturate-0, backdrop-saturate-50, backdrop-saturate-100, backdrop-saturate-150, backdrop-saturate-200
911
+
#### Backdrop Sepia
913
+
backdrop-sepia-0, backdrop-sepia
916
+
### Masks (NEW in v4)
925
+
mask-auto, mask-cover, mask-contain
930
+
mask-repeat, mask-no-repeat, mask-repeat-x, mask-repeat-y, mask-repeat-round, mask-repeat-space
935
+
mask-bottom, mask-center, mask-left, mask-left-bottom, mask-left-top, mask-right, mask-right-bottom, mask-right-top, mask-top
940
+
mask-origin-border, mask-origin-padding, mask-origin-content
945
+
mask-clip-border, mask-clip-padding, mask-clip-content
948
+
#### Mask Composite
950
+
mask-composite-add, mask-composite-subtract, mask-composite-intersect, mask-composite-exclude
955
+
mask-mode-match-source, mask-mode-luminance, mask-mode-alpha
960
+
mask-type-luminance, mask-type-alpha
965
+
#### Border Collapse
967
+
border-collapse, border-separate
970
+
#### Border Spacing
972
+
border-spacing-0, border-spacing-px, border-spacing-0.5, border-spacing-1, border-spacing-1.5, border-spacing-2, border-spacing-2.5, border-spacing-3, border-spacing-3.5, border-spacing-4, border-spacing-5, border-spacing-6, border-spacing-7, border-spacing-8, border-spacing-9, border-spacing-10, border-spacing-11, border-spacing-12, border-spacing-14, border-spacing-16, border-spacing-20, border-spacing-24, border-spacing-28, border-spacing-32, border-spacing-36, border-spacing-40, border-spacing-44, border-spacing-48, border-spacing-52, border-spacing-56, border-spacing-60, border-spacing-64, border-spacing-72, border-spacing-80, border-spacing-96
973
+
border-spacing-x-0, border-spacing-y-0 (and all other spacing values)
978
+
table-auto, table-fixed
983
+
caption-top, caption-bottom
990
+
scale-0, scale-50, scale-75, scale-90, scale-95, scale-100, scale-105, scale-110, scale-125, scale-150
991
+
scale-x-0, scale-x-50, scale-x-75, scale-x-90, scale-x-95, scale-x-100, scale-x-105, scale-x-110, scale-x-125, scale-x-150
992
+
scale-y-0, scale-y-50, scale-y-75, scale-y-90, scale-y-95, scale-y-100, scale-y-105, scale-y-110, scale-y-125, scale-y-150
995
+
#### Scale Z (NEW in v4)
997
+
scale-z-0, scale-z-50, scale-z-75, scale-z-90, scale-z-95, scale-z-100, scale-z-105, scale-z-110, scale-z-125, scale-z-150
1002
+
rotate-0, rotate-1, rotate-2, rotate-3, rotate-6, rotate-12, rotate-45, rotate-90, rotate-180, -rotate-180, -rotate-90, -rotate-45, -rotate-12, -rotate-6, -rotate-3, -rotate-2, -rotate-1
1005
+
#### Rotate X/Y (NEW in v4)
1007
+
rotate-x-0, rotate-x-1, rotate-x-2, rotate-x-3, rotate-x-6, rotate-x-12, rotate-x-45, rotate-x-90, rotate-x-180, -rotate-x-180, -rotate-x-90, -rotate-x-45, -rotate-x-12, -rotate-x-6, -rotate-x-3, -rotate-x-2, -rotate-x-1
1008
+
rotate-y-0, rotate-y-1, rotate-y-2, rotate-y-3, rotate-y-6, rotate-y-12, rotate-y-45, rotate-y-90, rotate-y-180, -rotate-y-180, -rotate-y-90, -rotate-y-45, -rotate-y-12, -rotate-y-6, -rotate-y-3, -rotate-y-2, -rotate-y-1
1013
+
translate-x-0, translate-x-px, translate-x-0.5, translate-x-1, translate-x-1.5, translate-x-2, translate-x-2.5, translate-x-3, translate-x-3.5, translate-x-4, translate-x-5, translate-x-6, translate-x-7, translate-x-8, translate-x-9, translate-x-10, translate-x-11, translate-x-12, translate-x-14, translate-x-16, translate-x-20, translate-x-24, translate-x-28, translate-x-32, translate-x-36, translate-x-40, translate-x-44, translate-x-48, translate-x-52, translate-x-56, translate-x-60, translate-x-64, translate-x-72, translate-x-80, translate-x-96, translate-x-1/2, translate-x-1/3, translate-x-2/3, translate-x-1/4, translate-x-2/4, translate-x-3/4, translate-x-full
1014
+
translate-y-0, translate-y-px, translate-y-0.5, translate-y-1, translate-y-1.5, translate-y-2, translate-y-2.5, translate-y-3, translate-y-3.5, translate-y-4, translate-y-5, translate-y-6, translate-y-7, translate-y-8, translate-y-9, translate-y-10, translate-y-11, translate-y-12, translate-y-14, translate-y-16, translate-y-20, translate-y-24, translate-y-28, translate-y-32, translate-y-36, translate-y-40, translate-y-44, translate-y-48, translate-y-52, translate-y-56, translate-y-60, translate-y-64, translate-y-72, translate-y-80, translate-y-96, translate-y-1/2, translate-y-1/3, translate-y-2/3, translate-y-1/4, translate-y-2/4, translate-y-3/4, translate-y-full
1017
+
#### Translate Z (NEW in v4)
1019
+
translate-z-0, translate-z-px, translate-z-0.5, translate-z-1, translate-z-1.5, translate-z-2, translate-z-2.5, translate-z-3, translate-z-3.5, translate-z-4, translate-z-5, translate-z-6, translate-z-7, translate-z-8, translate-z-9, translate-z-10, translate-z-11, translate-z-12, translate-z-14, translate-z-16, translate-z-20, translate-z-24, translate-z-28, translate-z-32, translate-z-36, translate-z-40, translate-z-44, translate-z-48, translate-z-52, translate-z-56, translate-z-60, translate-z-64, translate-z-72, translate-z-80, translate-z-96
1024
+
skew-x-0, skew-x-1, skew-x-2, skew-x-3, skew-x-6, skew-x-12, -skew-x-12, -skew-x-6, -skew-x-3, -skew-x-2, -skew-x-1
1025
+
skew-y-0, skew-y-1, skew-y-2, skew-y-3, skew-y-6, skew-y-12, -skew-y-12, -skew-y-6, -skew-y-3, -skew-y-2, -skew-y-1
1028
+
#### Transform Origin
1030
+
origin-center, origin-top, origin-top-right, origin-right, origin-bottom-right, origin-bottom, origin-bottom-left, origin-left, origin-top-left
1033
+
#### Transform Style (NEW in v4)
1035
+
transform-style-flat, transform-style-preserve-3d
1038
+
#### Perspective (NEW in v4)
1040
+
perspective-none, perspective-250, perspective-500, perspective-750, perspective-1000, perspective-distant
1043
+
#### Perspective Origin (NEW in v4)
1045
+
perspective-origin-center, perspective-origin-top, perspective-origin-top-right, perspective-origin-right, perspective-origin-bottom-right, perspective-origin-bottom, perspective-origin-bottom-left, perspective-origin-left, perspective-origin-top-left
1052
+
accent-auto, accent-inherit, accent-current, accent-transparent, accent-black, accent-white
1053
+
accent-{color} (all color utilities work with accent- prefix)
1058
+
appearance-none, appearance-auto
1063
+
cursor-auto, cursor-default, cursor-pointer, cursor-wait, cursor-text, cursor-move, cursor-help, cursor-not-allowed, cursor-none, cursor-context-menu, cursor-progress, cursor-cell, cursor-crosshair, cursor-vertical-text, cursor-alias, cursor-copy, cursor-no-drop, cursor-grab, cursor-grabbing, cursor-all-scroll, cursor-col-resize, cursor-row-resize, cursor-n-resize, cursor-e-resize, cursor-s-resize, cursor-w-resize, cursor-ne-resize, cursor-nw-resize, cursor-se-resize, cursor-sw-resize, cursor-ew-resize, cursor-ns-resize, cursor-nesw-resize, cursor-nwse-resize, cursor-zoom-in, cursor-zoom-out
1067
+
All color utilities work with `caret-` prefix
1069
+
#### Pointer Events
1071
+
pointer-events-none, pointer-events-auto
1076
+
resize-none, resize, resize-y, resize-x
1079
+
#### Scroll Behavior
1081
+
scroll-auto, scroll-smooth
1084
+
#### Scroll Margin
1086
+
scroll-m-0, scroll-m-px, scroll-m-0.5, scroll-m-1, scroll-m-1.5, scroll-m-2, scroll-m-2.5, scroll-m-3, scroll-m-3.5, scroll-m-4, scroll-m-5, scroll-m-6, scroll-m-7, scroll-m-8, scroll-m-9, scroll-m-10, scroll-m-11, scroll-m-12, scroll-m-14, scroll-m-16, scroll-m-20, scroll-m-24, scroll-m-28, scroll-m-32, scroll-m-36, scroll-m-40, scroll-m-44, scroll-m-48, scroll-m-52, scroll-m-56, scroll-m-60, scroll-m-64, scroll-m-72, scroll-m-80, scroll-m-96
1087
+
scroll-mx-0, scroll-my-0, scroll-ms-0, scroll-me-0, scroll-mt-0, scroll-mr-0, scroll-mb-0, scroll-ml-0 (and all spacing values)
1090
+
#### Scroll Padding
1092
+
scroll-p-0, scroll-p-px, scroll-p-0.5, scroll-p-1, scroll-p-1.5, scroll-p-2, scroll-p-2.5, scroll-p-3, scroll-p-3.5, scroll-p-4, scroll-p-5, scroll-p-6, scroll-p-7, scroll-p-8, scroll-p-9, scroll-p-10, scroll-p-11, scroll-p-12, scroll-p-14, scroll-p-16, scroll-p-20, scroll-p-24, scroll-p-28, scroll-p-32, scroll-p-36, scroll-p-40, scroll-p-44, scroll-p-48, scroll-p-52, scroll-p-56, scroll-p-60, scroll-p-64, scroll-p-72, scroll-p-80, scroll-p-96
1093
+
scroll-px-0, scroll-py-0, scroll-ps-0, scroll-pe-0, scroll-pt-0, scroll-pr-0, scroll-pb-0, scroll-pl-0 (and all spacing values)
1096
+
#### Scroll Snap Align
1098
+
snap-start, snap-end, snap-center, snap-align-none
1101
+
#### Scroll Snap Stop
1103
+
snap-normal, snap-always
1106
+
#### Scroll Snap Type
1108
+
snap-none, snap-x, snap-y, snap-both, snap-mandatory, snap-proximity
1113
+
touch-auto, touch-none, touch-pan-x, touch-pan-left, touch-pan-right, touch-pan-y, touch-pan-up, touch-pan-down, touch-pinch-zoom, touch-manipulation
1118
+
select-none, select-text, select-all, select-auto
1123
+
will-change-auto, will-change-scroll, will-change-contents, will-change-transform
1130
+
fill-none, fill-inherit, fill-current, fill-transparent, fill-black, fill-white
1131
+
fill-{color} (all color utilities work with fill- prefix)
1136
+
stroke-none, stroke-inherit, stroke-current, stroke-transparent, stroke-black, stroke-white
1137
+
stroke-{color} (all color utilities work with stroke- prefix)
1142
+
stroke-0, stroke-1, stroke-2
1147
+
#### Screen Readers
1149
+
sr-only, not-sr-only
1152
+
#### Forced Color Adjust
1154
+
forced-color-adjust-auto, forced-color-adjust-none
1157
+
### Container Queries (NEW in v4)
1159
+
#### Container Type
1161
+
@container, @container-normal, @container-size, @container-inline-size
1164
+
#### Container Query Variants
1166
+
@xs:, @sm:, @md:, @lg:, @xl:, @2xl:, @3xl:, @4xl:, @5xl:, @6xl:, @7xl:
1167
+
@min-w-0:, @min-w-xs:, @min-w-sm:, @min-w-md:, @min-w-lg:, @min-w-xl:, @min-w-2xl:, @min-w-3xl:, @min-w-4xl:, @min-w-5xl:, @min-w-6xl:, @min-w-7xl:
1168
+
@max-w-xs:, @max-w-sm:, @max-w-md:, @max-w-lg:, @max-w-xl:, @max-w-2xl:, @max-w-3xl:, @max-w-4xl:, @max-w-5xl:, @max-w-6xl:, @max-w-7xl:
1169
+
@min-h-0:, @min-h-xs:, @min-h-sm:, @min-h-md:, @min-h-lg:, @min-h-xl:, @min-h-2xl:, @min-h-3xl:, @min-h-4xl:, @min-h-5xl:, @min-h-6xl:, @min-h-7xl:
1170
+
@max-h-xs:, @max-h-sm:, @max-h-md:, @max-h-lg:, @max-h-xl:, @max-h-2xl:, @max-h-3xl:, @max-h-4xl:, @max-h-5xl:, @max-h-6xl:, @max-h-7xl:
1173
+
### Responsive Design
1175
+
#### Breakpoint Variants
1177
+
sm:, md:, lg:, xl:, 2xl:
1178
+
max-sm:, max-md:, max-lg:, max-xl:, max-2xl:
1181
+
### State Variants
1183
+
#### Hover, Focus, etc.
1185
+
hover:, focus:, focus-within:, focus-visible:, active:, visited:, target:, disabled:, enabled:, checked:, indeterminate:, default:, required:, valid:, invalid:, in-range:, out-of-range:, placeholder-shown:, autofill:, read-only:
1190
+
group-hover:, group-focus:, group-focus-within:, group-focus-visible:, group-active:, group-visited:, group-target:, group-disabled:, group-enabled:, group-checked:, group-indeterminate:, group-default:, group-required:, group-valid:, group-invalid:, group-in-range:, group-out-of-range:, group-placeholder-shown:, group-autofill:, group-read-only:
1195
+
peer-hover:, peer-focus:, peer-focus-within:, peer-focus-visible:, peer-active:, peer-visited:, peer-target:, peer-disabled:, peer-enabled:, peer-checked:, peer-indeterminate:, peer-default:, peer-required:, peer-valid:, peer-invalid:, peer-in-range:, peer-out-of-range:, peer-placeholder-shown:, peer-autofill:, peer-read-only:
1198
+
#### NEW Variants in v4
1200
+
@starting-style:, not-*, nth-*, in-*, inert:, open: (for popovers)
1212
+
motion-safe:, motion-reduce:
1217
+
contrast-more:, contrast-less:
1227
+
portrait:, landscape:
1232
+
content-none, content-['text']
1235
+
### Arbitrary Values
1236
+
You can use arbitrary values with square brackets for any property:
1238
+
w-[123px], h-[456px], text-[#bada55], bg-[url('...')], top-[117px], left-[344px]
1239
+
m-[12px], p-[24px], grid-cols-[200px_minmax(900px,_1fr)_100px]
1242
+
### Arbitrary Properties
1244
+
[mask-type:luminance], [tab-size:4], [@supports(backdrop-filter:blur(0))]:bg-white/75
1247
+
### Arbitrary Variants
1249
+
[&:nth-child(3)]:, [&:hover]:, [&_p]:, [@media(min-width:600px)]:
1250
+
[@supports(backdrop-filter:blur(0))]:, [data-theme="dark"]:
1253
+
## Common v4 Pitfalls to Avoid
1255
+
### Don't Use These Deprecated Patterns
1256
+
- ❌ `@tailwind base; @tailwind components; @tailwind utilities;`
1257
+
- ❌ `text-opacity-50` → Use `text-white/50` instead
1258
+
- ❌ `bg-opacity-25` → Use `bg-blue-500/25` instead
1259
+
- ❌ `border` without color (now uses currentColor, not gray-200)
1260
+
- ❌ `ring` without explicit width (now 1px, was 3px)
1261
+
- ❌ `@layer utilities` → Use `@utility` instead
1262
+
- ❌ JavaScript config for new projects → Use CSS `@theme`
1264
+
### Modern v4 Alternatives
1265
+
- ✅ `@import "tailwindcss";`
1266
+
- ✅ `text-white/50` for semi-transparent text
1267
+
- ✅ `bg-blue-500/25` for semi-transparent backgrounds
1268
+
- ✅ `border border-gray-200` for explicit border color
1269
+
- ✅ `ring-3` for 3px ring width
1270
+
- ✅ `@utility` for custom utilities
1271
+
- ✅ `@theme` for configuration
1273
+
## Performance Best Practices
1275
+
### Leverage v4's Performance Features
1276
+
- Use automatic content detection (no manual `content` config needed)
1277
+
- Prefer container queries over viewport queries for true component responsiveness
1278
+
- Use CSS variables from `@theme` for dynamic styling
1279
+
- Leverage the new OKLCH color system for better color consistency
1281
+
### Efficient Class Usage
1283
+
<!-- Good: Use size-* for square elements -->
1284
+
<div class="size-12"></div>
1286
+
<!-- Instead of: -->
1287
+
<div class="w-12 h-12"></div>
1289
+
<!-- Good: Use container queries for component responsiveness -->
1290
+
<div class="@container">
1291
+
<div class="p-4 @lg:p-8">Content</div>
1294
+
<!-- Good: Use CSS variables for dynamic values -->
1295
+
<div class="bg-[var(--theme-primary)] text-[var(--theme-on-primary)]">
1300
+
## Framework Integration
1305
+
let { variant = "primary", children } = $props();
1307
+
const buttonClasses = $derived(() => [
1308
+
'px-4 py-2 rounded-md font-medium transition-colors',
1309
+
variant === 'primary'
1310
+
? 'bg-brand text-white hover:bg-brand/90'
1311
+
: 'bg-gray-100 text-gray-900 hover:bg-gray-200'
1315
+
<button class={buttonClasses}>
1316
+
{@render children()}
1320
+
@import "tailwindcss";
1323
+
--color-brand: oklch(0.5 0.2 240);
1328
+
## Debugging & Development
1330
+
### Browser DevTools Tips
1331
+
1. **Inspect CSS Variables**: Check `:root` in DevTools to see all theme variables
1332
+
2. **Check Cascade Layers**: Use the Layers panel to understand style precedence
1333
+
3. **Verify OKLCH Support**: Test colors in modern browsers vs fallbacks
1334
+
4. **Container Query Debugging**: Use the @container panel in DevTools
1336
+
### Common Debug Commands
1338
+
# Check if utilities are being generated
1339
+
npx tailwindcss --watch --content "./src/**/*.{html,js,jsx,ts,tsx}"
1341
+
# Verify v4 installation
1342
+
npm list tailwindcss
1344
+
# Check for conflicting PostCSS plugins
1345
+
npm list | grep postcss
1348
+
### VS Code Extensions
1349
+
- Tailwind CSS IntelliSense (updated for v4)
1350
+
- PostCSS Language Support
1352
+
## v3 to v4 Migration Checklist
1355
+
- [ ] Backup your project
1356
+
- [ ] Ensure Node.js 20+ is installed
1357
+
- [ ] Check browser support requirements (Safari 16.4+, Chrome 111+, Firefox 128+)
1359
+
### Automated Migration
1361
+
npx @tailwindcss/upgrade@next
1364
+
### Manual Verification
1365
+
- [ ] Replace `@tailwind` directives with `@import "tailwindcss"`
1366
+
- [ ] Move `tailwind.config.js` content to CSS `@theme`
1367
+
- [ ] Update deprecated utility classes
1368
+
- [ ] Test container queries functionality
1369
+
- [ ] Verify custom component styles
1370
+
- [ ] Check 3D transform support
1371
+
- [ ] Test mask utilities if used
1372
+
- [ ] Validate color consistency (OKLCH vs RGB)
1375
+
- [ ] Test in all target browsers
1376
+
- [ ] Verify responsive design still works
1377
+
- [ ] Check dark mode functionality
1378
+
- [ ] Test custom animations
1379
+
- [ ] Validate accessibility features
1381
+
## Production-Ready Component Patterns
1383
+
### Modern Card Component
1385
+
<div class="@container group">
1387
+
bg-white dark:bg-gray-900
1388
+
rounded-xl shadow-sm border border-gray-200 dark:border-gray-800
1389
+
overflow-hidden transition-all duration-200
1390
+
hover:shadow-md hover:-translate-y-0.5
1391
+
@sm:flex @sm:items-center
1393
+
<div class="@sm:flex-shrink-0">
1394
+
<img class="h-48 w-full object-cover @sm:h-full @sm:w-48" src="..." alt="...">
1396
+
<div class="p-6 @sm:p-8">
1397
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-white @lg:text-xl">
1400
+
<p class="mt-2 text-gray-600 dark:text-gray-300 @lg:text-lg">
1401
+
Card description that adapts to container size.
1408
+
### 3D Interactive Button
1411
+
relative px-6 py-3 bg-blue-600 text-white font-medium rounded-lg
1412
+
transform-3d perspective-1000
1413
+
transition-all duration-200
1414
+
hover:rotate-x-12 hover:scale-105 hover:shadow-xl
1415
+
active:scale-95 active:rotate-x-6
1416
+
focus:outline-none focus:ring-2 focus:ring-blue-500/50
1422
+
Remember: Tailwind CSS v4 is designed for modern browsers and modern development workflows. Embrace the new CSS-first approach and leverage the powerful new features for better performance and developer experience.