@biggora/claude-plugins 1.2.0 → 1.2.2
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/README.md +11 -4
- package/package.json +1 -1
- package/registry/registry.json +319 -244
- package/specs/coding.md +24 -0
- package/specs/pod.md +2 -0
- package/src/skills/captcha/README.md +221 -0
- package/src/skills/captcha/SKILL.md +355 -0
- package/src/skills/captcha/references/captcha-types.md +254 -0
- package/src/skills/captcha/references/services.md +172 -0
- package/src/skills/captcha/references/stealth.md +238 -0
- package/src/skills/captcha/scripts/solve_captcha.py +323 -0
- package/src/skills/captcha/scripts/solve_image_grid.py +350 -0
- package/src/skills/google-merchant-api/SKILL.md +581 -0
- package/src/skills/google-merchant-api/references/accounts.md +247 -0
- package/src/skills/google-merchant-api/references/content-api-legacy.md +216 -0
- package/src/skills/google-merchant-api/references/datasources.md +233 -0
- package/src/skills/google-merchant-api/references/inventories.md +201 -0
- package/src/skills/google-merchant-api/references/migration.md +267 -0
- package/src/skills/google-merchant-api/references/products.md +316 -0
- package/src/skills/google-merchant-api/references/promotions.md +201 -0
- package/src/skills/google-merchant-api/references/reports.md +240 -0
- package/src/skills/lv-aggregators-api/SKILL.md +113 -0
- package/src/skills/lv-aggregators-api/references/integration-guide.md +368 -0
- package/src/skills/lv-aggregators-api/references/kurpirkt.md +103 -0
- package/src/skills/lv-aggregators-api/references/salidzini.md +122 -0
- package/src/skills/tailwindcss-best-practices/SKILL.md +180 -0
- package/src/skills/tailwindcss-best-practices/references/best-practices-utility-patterns.md +87 -0
- package/src/skills/tailwindcss-best-practices/references/core-installation.md +109 -0
- package/src/skills/tailwindcss-best-practices/references/core-preflight.md +200 -0
- package/src/skills/tailwindcss-best-practices/references/core-responsive.md +163 -0
- package/src/skills/tailwindcss-best-practices/references/core-source-detection.md +114 -0
- package/src/skills/tailwindcss-best-practices/references/core-theme.md +108 -0
- package/src/skills/tailwindcss-best-practices/references/core-utility-classes.md +59 -0
- package/src/skills/tailwindcss-best-practices/references/core-variants.md +204 -0
- package/src/skills/tailwindcss-best-practices/references/effects-form-controls.md +76 -0
- package/src/skills/tailwindcss-best-practices/references/effects-mask.md +91 -0
- package/src/skills/tailwindcss-best-practices/references/effects-scroll-snap.md +59 -0
- package/src/skills/tailwindcss-best-practices/references/effects-text-shadow.md +78 -0
- package/src/skills/tailwindcss-best-practices/references/effects-transition-animation.md +80 -0
- package/src/skills/tailwindcss-best-practices/references/effects-visibility-interactivity.md +82 -0
- package/src/skills/tailwindcss-best-practices/references/features-content-detection.md +175 -0
- package/src/skills/tailwindcss-best-practices/references/features-custom-styles.md +203 -0
- package/src/skills/tailwindcss-best-practices/references/features-dark-mode.md +137 -0
- package/src/skills/tailwindcss-best-practices/references/features-functions-directives.md +241 -0
- package/src/skills/tailwindcss-best-practices/references/features-upgrade.md +160 -0
- package/src/skills/tailwindcss-best-practices/references/layout-aspect-ratio.md +39 -0
- package/src/skills/tailwindcss-best-practices/references/layout-columns.md +80 -0
- package/src/skills/tailwindcss-best-practices/references/layout-display.md +110 -0
- package/src/skills/tailwindcss-best-practices/references/layout-flexbox.md +112 -0
- package/src/skills/tailwindcss-best-practices/references/layout-grid.md +87 -0
- package/src/skills/tailwindcss-best-practices/references/layout-height.md +97 -0
- package/src/skills/tailwindcss-best-practices/references/layout-inset.md +103 -0
- package/src/skills/tailwindcss-best-practices/references/layout-logical-properties.md +92 -0
- package/src/skills/tailwindcss-best-practices/references/layout-margin.md +126 -0
- package/src/skills/tailwindcss-best-practices/references/layout-min-max-sizing.md +63 -0
- package/src/skills/tailwindcss-best-practices/references/layout-object-fit-position.md +64 -0
- package/src/skills/tailwindcss-best-practices/references/layout-overflow.md +57 -0
- package/src/skills/tailwindcss-best-practices/references/layout-padding.md +77 -0
- package/src/skills/tailwindcss-best-practices/references/layout-position.md +85 -0
- package/src/skills/tailwindcss-best-practices/references/layout-tables.md +67 -0
- package/src/skills/tailwindcss-best-practices/references/layout-width.md +102 -0
- package/src/skills/tailwindcss-best-practices/references/transform-base.md +68 -0
- package/src/skills/tailwindcss-best-practices/references/transform-rotate.md +70 -0
- package/src/skills/tailwindcss-best-practices/references/transform-scale.md +83 -0
- package/src/skills/tailwindcss-best-practices/references/transform-skew.md +62 -0
- package/src/skills/tailwindcss-best-practices/references/transform-translate.md +77 -0
- package/src/skills/tailwindcss-best-practices/references/typography-font-text.md +142 -0
- package/src/skills/tailwindcss-best-practices/references/typography-list-style.md +65 -0
- package/src/skills/tailwindcss-best-practices/references/typography-text-align.md +60 -0
- package/src/skills/tailwindcss-best-practices/references/visual-background.md +76 -0
- package/src/skills/tailwindcss-best-practices/references/visual-border.md +108 -0
- package/src/skills/tailwindcss-best-practices/references/visual-effects.md +111 -0
- package/src/skills/tailwindcss-best-practices/references/visual-svg.md +82 -0
- package/src/skills/test-mobile-app/SKILL.md +11 -6
- package/src/skills/test-mobile-app/scripts/analyze_apk.py +15 -4
- package/src/skills/test-mobile-app/scripts/check_environment.py +5 -5
- package/src/skills/test-mobile-app/scripts/run_tests.py +1 -1
- package/src/skills/test-web-ui/SKILL.md +264 -84
- package/src/skills/test-web-ui/scripts/discover.py +25 -12
- package/src/skills/test-web-ui/scripts/run_tests.py +3 -2
- package/src/skills/vite-best-practices/SKILL.md +115 -0
- package/src/skills/vite-best-practices/references/build-and-ssr.md +255 -0
- package/src/skills/vite-best-practices/references/core-config.md +231 -0
- package/src/skills/vite-best-practices/references/core-features.md +222 -0
- package/src/skills/vite-best-practices/references/core-plugin-api.md +294 -0
- package/src/skills/vite-best-practices/references/environment-api.md +108 -0
- package/src/skills/vite-best-practices/references/rolldown-migration.md +242 -0
- package/codex-cli-workspace/iteration-1/benchmark.json +0 -122
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/eval_metadata.json +0 -13
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/with_skill/grading.json +0 -52
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/with_skill/outputs/response.md +0 -163
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/with_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/without_skill/grading.json +0 -58
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/without_skill/outputs/response.md +0 -151
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/without_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/eval_metadata.json +0 -13
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/grading.json +0 -52
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/outputs/response.md +0 -86
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/grading.json +0 -58
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/outputs/response.md +0 -164
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/eval_metadata.json +0 -13
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/with_skill/grading.json +0 -52
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/with_skill/outputs/response.md +0 -130
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/with_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/without_skill/grading.json +0 -64
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/without_skill/outputs/response.md +0 -209
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/without_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/review.html +0 -1325
- package/gemini-cli-workspace/iteration-1/benchmark.json +0 -86
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/with_skill/outputs/response.md +0 -401
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/without_skill/outputs/response.md +0 -405
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/outputs/response.md +0 -212
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/outputs/response.md +0 -427
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/eval_metadata.json +0 -32
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/outputs/response.md +0 -171
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/outputs/response.md +0 -199
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/review.html +0 -1325
- package/gemini-cli-workspace/iteration-2/benchmark.json +0 -173
- package/gemini-cli-workspace/iteration-2/benchmark.md +0 -28
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/with_skill/outputs/response.md +0 -195
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/without_skill/outputs/response.md +0 -377
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/with_skill/outputs/response.md +0 -127
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/without_skill/outputs/response.md +0 -164
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/eval_metadata.json +0 -32
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/with_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/with_skill/outputs/response.md +0 -91
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/without_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/without_skill/outputs/response.md +0 -112
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-viewer.html +0 -1325
- package/screen-recording-workspace/evals.json +0 -41
- package/screen-recording-workspace/iteration-1/benchmark.json +0 -102
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/eval_metadata.json +0 -31
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/with_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/with_skill/outputs/demo.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/with_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/without_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/without_skill/outputs/demo.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/without_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/eval_metadata.json +0 -31
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/with_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/with_skill/outputs/region_capture.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/with_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/without_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/without_skill/outputs/region_capture.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/without_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/eval_metadata.json +0 -31
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/with_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/with_skill/outputs/fallback_recording.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/with_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/outputs/fallback_recording.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/outputs/record_screen.py +0 -67
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/review.html +0 -1325
- package/src/skills/codex-cli/evals/evals.json +0 -47
- package/src/skills/gemini-cli/evals/evals.json +0 -46
- package/src/skills/tm-search/evals/evals.json +0 -23
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: features-upgrade
|
|
3
|
+
description: Migrating from Tailwind CSS v3 to v4, all renamed utilities, scale shifts, config migration, and v4.1/v4.2 changes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Upgrade Guide (v3 → v4)
|
|
7
|
+
|
|
8
|
+
Key changes when upgrading from Tailwind CSS v3 to v4. Use the automated upgrade tool when possible.
|
|
9
|
+
|
|
10
|
+
## Upgrade Tool
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @tailwindcss/upgrade
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires Node.js 20+. Run in a new branch, review diff, test. Handles most migration automatically.
|
|
17
|
+
|
|
18
|
+
## Installation Changes
|
|
19
|
+
|
|
20
|
+
- **PostCSS**: Use `@tailwindcss/postcss`; remove `postcss-import` and `autoprefixer` (handled by v4)
|
|
21
|
+
- **Vite**: Prefer `@tailwindcss/vite` over PostCSS (supports Vite 8+ as of v4.2.2)
|
|
22
|
+
- **Webpack**: Use `@tailwindcss/webpack` (new in v4.2)
|
|
23
|
+
- **CLI**: Use `npx @tailwindcss/cli` instead of `npx tailwindcss`
|
|
24
|
+
|
|
25
|
+
## Import Change
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
/* v3 */
|
|
29
|
+
@tailwind base;
|
|
30
|
+
@tailwind components;
|
|
31
|
+
@tailwind utilities;
|
|
32
|
+
|
|
33
|
+
/* v4 */
|
|
34
|
+
@import "tailwindcss";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Renamed Utilities — Scale Shifts
|
|
38
|
+
|
|
39
|
+
These are the most commonly missed renames because the entire scale shifted down by one step:
|
|
40
|
+
|
|
41
|
+
| v3 | v4 | What happened |
|
|
42
|
+
|----|-----|---------------|
|
|
43
|
+
| `shadow-sm` | `shadow-xs` | Scale shifted down |
|
|
44
|
+
| `shadow` | `shadow-sm` | Scale shifted down |
|
|
45
|
+
| `rounded-sm` | `rounded-xs` | Scale shifted down |
|
|
46
|
+
| `rounded` | `rounded-sm` | Scale shifted down |
|
|
47
|
+
| `blur-sm` | `blur-xs` | Scale shifted down |
|
|
48
|
+
| `blur` | `blur-sm` | Scale shifted down |
|
|
49
|
+
|
|
50
|
+
## Renamed Utilities — Other
|
|
51
|
+
|
|
52
|
+
| v3 | v4 |
|
|
53
|
+
|----|-----|
|
|
54
|
+
| `outline-none` | `outline-hidden` |
|
|
55
|
+
| `ring` | `ring-3` (default width changed from 3px to 1px) |
|
|
56
|
+
|
|
57
|
+
## Important Modifier
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<!-- v3: ! at start -->
|
|
61
|
+
<div class="!bg-red-500">
|
|
62
|
+
|
|
63
|
+
<!-- v4: ! at end -->
|
|
64
|
+
<div class="bg-red-500!">
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Removed / Replaced
|
|
68
|
+
|
|
69
|
+
| v3 | v4 |
|
|
70
|
+
|----|-----|
|
|
71
|
+
| `bg-opacity-*`, `text-opacity-*`, etc. | `bg-black/50`, `text-black/50` (slash syntax) |
|
|
72
|
+
| `flex-shrink-*` | `shrink-*` |
|
|
73
|
+
| `flex-grow-*` | `grow-*` |
|
|
74
|
+
| `overflow-ellipsis` | `text-ellipsis` |
|
|
75
|
+
| `decoration-slice` / `decoration-clone` | `box-decoration-slice` / `box-decoration-clone` |
|
|
76
|
+
|
|
77
|
+
## Ring & Border Defaults
|
|
78
|
+
|
|
79
|
+
- `ring` width: 3px → 1px; use `ring-3` for v3 behavior
|
|
80
|
+
- `ring` / `border` default color: `currentColor` (was gray-200 / blue-500 in v3)
|
|
81
|
+
- Always specify color: `ring-3 ring-blue-500`, `border border-gray-200`
|
|
82
|
+
|
|
83
|
+
## Configuration Migration
|
|
84
|
+
|
|
85
|
+
| v3 Concept | v4 Equivalent |
|
|
86
|
+
|------------|---------------|
|
|
87
|
+
| `tailwind.config.js` | Removed. Use CSS directives. |
|
|
88
|
+
| `darkMode: 'class'` | `@custom-variant dark (&:where(.dark, .dark *));` |
|
|
89
|
+
| `darkMode: 'media'` | Default in v4 (uses `prefers-color-scheme`). No config needed. |
|
|
90
|
+
| `theme.extend.colors` | `@theme { --color-*: value; }` |
|
|
91
|
+
| `theme.extend.screens` | `@theme { --breakpoint-*: value; }` |
|
|
92
|
+
| `theme.extend.fontFamily` | `@theme { --font-*: value; }` |
|
|
93
|
+
| `content: [...]` | Automatic detection. Use `@source` to add/exclude paths. |
|
|
94
|
+
| `safelist: [...]` | `@source inline("classes")` (v4.1+) |
|
|
95
|
+
| `@layer utilities { }` | `@utility name { }` |
|
|
96
|
+
| `plugins: [...]` | `@plugin "./my-plugin.js"` |
|
|
97
|
+
|
|
98
|
+
## CSS Variable Syntax Change
|
|
99
|
+
|
|
100
|
+
```html
|
|
101
|
+
<!-- v3: square brackets for CSS variables -->
|
|
102
|
+
<div class="bg-[--my-var]">
|
|
103
|
+
|
|
104
|
+
<!-- v4: parentheses for CSS variables -->
|
|
105
|
+
<div class="bg-(--my-var)">
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Theme Function Change
|
|
109
|
+
|
|
110
|
+
```css
|
|
111
|
+
/* v3 */
|
|
112
|
+
@media (min-width: theme(screens.xl)) { ... }
|
|
113
|
+
|
|
114
|
+
/* v4 */
|
|
115
|
+
@media (min-width: theme(--breakpoint-xl)) { ... }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Other Breaking Changes
|
|
119
|
+
|
|
120
|
+
- **Variant stacking**: Left-to-right in v4 (was right-to-left in v3)
|
|
121
|
+
- **Transform reset**: `transform-none` no longer resets rotate/scale/translate; use `scale-none`, `rotate-none`, etc.
|
|
122
|
+
- **Hover on mobile**: `hover` only applies when device supports hover; override with `@custom-variant hover (&:hover)` if needed
|
|
123
|
+
- **Space/divide selectors**: Changed from `:not([hidden]) ~ :not([hidden])` to `:not(:last-child)`
|
|
124
|
+
- **Sass/Less/Stylus**: v4 not designed for use with CSS preprocessors
|
|
125
|
+
|
|
126
|
+
## Deprecations in v4.2
|
|
127
|
+
|
|
128
|
+
- `start-*` / `end-*` → use `inset-s-*` / `inset-e-*`
|
|
129
|
+
- `bg-left-top` style → use `bg-top-left` (position order reversed)
|
|
130
|
+
- `object-left-top` style → use `object-top-left` (position order reversed)
|
|
131
|
+
|
|
132
|
+
## Browser Support
|
|
133
|
+
|
|
134
|
+
v4 targets Safari 16.4+, Chrome 111+, Firefox 128+. For older browsers, stay on v3.4.
|
|
135
|
+
|
|
136
|
+
## Post-v4.0 Feature Additions
|
|
137
|
+
|
|
138
|
+
### v4.1 (April 2025)
|
|
139
|
+
- Text shadow utilities (`text-shadow-*`)
|
|
140
|
+
- Mask utilities (`mask-*`)
|
|
141
|
+
- Colored drop shadows (`drop-shadow-<color>`)
|
|
142
|
+
- Text wrapping (`wrap-break-word`, `wrap-anywhere`)
|
|
143
|
+
- Pointer device variants (`pointer-fine:`, `pointer-coarse:`)
|
|
144
|
+
- Safe alignment (`justify-center-safe`, `items-center-safe`)
|
|
145
|
+
- New variants: `details-content`, `inverted-colors`, `noscript`, `user-valid`, `user-invalid`
|
|
146
|
+
- `@source not` and `@source inline()` directives
|
|
147
|
+
|
|
148
|
+
### v4.2 (February 2025)
|
|
149
|
+
- New colors: mauve, olive, mist, taupe
|
|
150
|
+
- Webpack plugin (`@tailwindcss/webpack`)
|
|
151
|
+
- Block logical property utilities (`pbs-*`, `mbs-*`, `border-bs-*`, `inline-*`, `block-*`)
|
|
152
|
+
- Logical inset utilities (`inset-s-*`, `inset-e-*`, `inset-bs-*`, `inset-be-*`)
|
|
153
|
+
- Font feature settings (`font-features-*`)
|
|
154
|
+
|
|
155
|
+
<!--
|
|
156
|
+
Source references:
|
|
157
|
+
- https://tailwindcss.com/docs/upgrade-guide
|
|
158
|
+
- https://tailwindcss.com/blog/tailwindcss-v4-1
|
|
159
|
+
- https://github.com/tailwindlabs/tailwindcss/releases/tag/v4.2.0
|
|
160
|
+
-->
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layout-aspect-ratio
|
|
3
|
+
description: Controlling element aspect ratio for responsive media
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Aspect Ratio
|
|
7
|
+
|
|
8
|
+
Utilities for controlling the aspect ratio of an element (e.g. video, images).
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<!-- 16:9 video container -->
|
|
14
|
+
<div class="aspect-video">
|
|
15
|
+
<iframe src="..."></iframe>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- 4:3 -->
|
|
19
|
+
<div class="aspect-[4/3]">Content</div>
|
|
20
|
+
|
|
21
|
+
<!-- Square -->
|
|
22
|
+
<div class="aspect-square">1:1</div>
|
|
23
|
+
|
|
24
|
+
<!-- Auto (intrinsic) -->
|
|
25
|
+
<div class="aspect-auto">Natural ratio</div>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Key Points
|
|
29
|
+
|
|
30
|
+
- `aspect-video` - 16:9
|
|
31
|
+
- `aspect-square` - 1:1
|
|
32
|
+
- `aspect-auto` - browser default (intrinsic)
|
|
33
|
+
- `aspect-[4/3]` - arbitrary ratio
|
|
34
|
+
- Useful for responsive video embeds and image containers
|
|
35
|
+
|
|
36
|
+
<!--
|
|
37
|
+
Source references:
|
|
38
|
+
- https://tailwindcss.com/docs/aspect-ratio
|
|
39
|
+
-->
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layout-columns
|
|
3
|
+
description: Multi-column layout with columns utility for masonry-like or newspaper layouts
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Columns
|
|
7
|
+
|
|
8
|
+
Utilities for CSS multi-column layout. Content flows into multiple columns within a single element.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### By number of columns
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<div class="columns-3 gap-8">
|
|
16
|
+
<img class="aspect-3/2" src="1.jpg" />
|
|
17
|
+
<img class="aspect-square" src="2.jpg" />
|
|
18
|
+
<!-- Content flows into 3 columns -->
|
|
19
|
+
</div>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### By column width
|
|
23
|
+
|
|
24
|
+
Use container scale for ideal column width; column count adjusts automatically:
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div class="columns-3xs gap-4">...</div>
|
|
28
|
+
<div class="columns-sm gap-6">...</div>
|
|
29
|
+
<div class="columns-md">...</div>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Column gap
|
|
33
|
+
|
|
34
|
+
Use `gap-*` utilities for space between columns:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<div class="columns-3 gap-8">...</div>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Responsive
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<div class="columns-2 gap-4 sm:columns-3 sm:gap-8">...</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Custom value
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<div class="columns-[30vw]">...</div>
|
|
50
|
+
<div class="columns-(--my-columns)">...</div>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Column / page breaks
|
|
54
|
+
|
|
55
|
+
Use with multi-column or print layouts:
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<div class="columns-2">
|
|
59
|
+
<p>Content...</p>
|
|
60
|
+
<p class="break-after-column">Force break after this</p>
|
|
61
|
+
<p>Next column...</p>
|
|
62
|
+
</div>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- `break-after-column` / `break-before-column` - column break
|
|
66
|
+
- `break-after-page` / `break-before-page` - page break (print)
|
|
67
|
+
- `break-after-avoid` / `break-inside-avoid` - avoid breaking
|
|
68
|
+
|
|
69
|
+
## Key Points
|
|
70
|
+
|
|
71
|
+
- `columns-<n>` - fixed number of columns (e.g. `columns-3`)
|
|
72
|
+
- `columns-3xs` through `columns-7xl` - column width from container scale
|
|
73
|
+
- `columns-auto` - auto columns
|
|
74
|
+
- `gap-*` controls column gap (same as flex/grid gap)
|
|
75
|
+
- Use for magazine-style layouts, image galleries, long text
|
|
76
|
+
|
|
77
|
+
<!--
|
|
78
|
+
Source references:
|
|
79
|
+
- https://tailwindcss.com/docs/columns
|
|
80
|
+
-->
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layout-display
|
|
3
|
+
description: Controlling element display type including flex, grid, block, inline, hidden, and sr-only
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Display
|
|
7
|
+
|
|
8
|
+
Utilities for controlling the display box type of an element.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Basic display types
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<span class="inline">display: inline</span>
|
|
16
|
+
<span class="inline-block">display: inline-block</span>
|
|
17
|
+
<div class="block">display: block</div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Flex and Grid containers
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Flex container -->
|
|
24
|
+
<div class="flex items-center gap-4">Flex layout</div>
|
|
25
|
+
<span class="inline-flex items-baseline">Inline flex with text</span>
|
|
26
|
+
|
|
27
|
+
<!-- Grid container -->
|
|
28
|
+
<div class="grid grid-cols-3 gap-4">Grid layout</div>
|
|
29
|
+
<span class="inline-grid grid-cols-3 gap-4">Inline grid</span>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Flow root
|
|
33
|
+
|
|
34
|
+
Use `flow-root` to create a block-level element with its own block formatting context (fixes margin collapse):
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<div class="flow-root">
|
|
38
|
+
<div class="my-4">Content with isolated BFC</div>
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Contents
|
|
43
|
+
|
|
44
|
+
Use `contents` for a "phantom" container whose children act like direct children of the parent:
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<div class="flex">
|
|
48
|
+
<div class="flex-1">01</div>
|
|
49
|
+
<div class="contents">
|
|
50
|
+
<div class="flex-1">02</div>
|
|
51
|
+
<div class="flex-1">03</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="flex-1">04</div>
|
|
54
|
+
</div>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Table display
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<div class="table w-full">
|
|
61
|
+
<div class="table-header-group bg-gray-100">
|
|
62
|
+
<div class="table-row">
|
|
63
|
+
<div class="table-cell p-2">Header 1</div>
|
|
64
|
+
<div class="table-cell p-2">Header 2</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="table-row-group">
|
|
68
|
+
<div class="table-row">
|
|
69
|
+
<div class="table-cell p-2">Cell 1</div>
|
|
70
|
+
<div class="table-cell p-2">Cell 2</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Hidden
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<div class="hidden">Removed from document flow</div>
|
|
80
|
+
<div class="md:block hidden">Visible only on md+</div>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For visual-only hiding while keeping in DOM, use `invisible` or `opacity-0` instead.
|
|
84
|
+
|
|
85
|
+
### Screen reader only
|
|
86
|
+
|
|
87
|
+
```html
|
|
88
|
+
<a href="#">
|
|
89
|
+
<svg><!-- icon --></svg>
|
|
90
|
+
<span class="sr-only">Settings</span>
|
|
91
|
+
</a>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Use `not-sr-only` to undo: `<span class="sr-only sm:not-sr-only">Settings</span>`
|
|
95
|
+
|
|
96
|
+
## Key Points
|
|
97
|
+
|
|
98
|
+
- `flex` / `inline-flex` - Flexbox layout
|
|
99
|
+
- `grid` / `inline-grid` - CSS Grid layout
|
|
100
|
+
- `block` / `inline` / `inline-block` - Basic flow
|
|
101
|
+
- `hidden` - `display: none` (removes from flow)
|
|
102
|
+
- `sr-only` - Visually hidden but accessible to screen readers
|
|
103
|
+
- `contents` - Children participate in parent's layout
|
|
104
|
+
- `flow-root` - Establishes new BFC
|
|
105
|
+
- Table utilities: `table`, `table-row`, `table-cell`, `table-header-group`, etc.
|
|
106
|
+
|
|
107
|
+
<!--
|
|
108
|
+
Source references:
|
|
109
|
+
- https://tailwindcss.com/docs/display
|
|
110
|
+
-->
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layout-flexbox
|
|
3
|
+
description: Flexbox layout utilities including flex-direction, justify, items, gap, grow, shrink, and wrap
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Flexbox
|
|
7
|
+
|
|
8
|
+
Utilities for building flex layouts: direction, alignment, gap, and item sizing.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Flex direction and wrap
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<div class="flex flex-row">Horizontal (default)</div>
|
|
16
|
+
<div class="flex flex-row-reverse">Reversed</div>
|
|
17
|
+
<div class="flex flex-col">Vertical</div>
|
|
18
|
+
<div class="flex flex-col-reverse">Vertical reversed</div>
|
|
19
|
+
|
|
20
|
+
<div class="flex flex-wrap">Wrap when needed</div>
|
|
21
|
+
<div class="flex flex-nowrap">No wrap (default)</div>
|
|
22
|
+
<div class="flex flex-wrap-reverse">Wrap reversed</div>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Justify content
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<div class="flex justify-start">Start</div>
|
|
29
|
+
<div class="flex justify-end">End</div>
|
|
30
|
+
<div class="flex justify-center">Center</div>
|
|
31
|
+
<div class="flex justify-between">Space between</div>
|
|
32
|
+
<div class="flex justify-around">Space around</div>
|
|
33
|
+
<div class="flex justify-evenly">Space evenly</div>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Align items
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<div class="flex items-start">Align start</div>
|
|
40
|
+
<div class="flex items-end">Align end</div>
|
|
41
|
+
<div class="flex items-center">Center (common)</div>
|
|
42
|
+
<div class="flex items-baseline">Baseline</div>
|
|
43
|
+
<div class="flex items-stretch">Stretch (default)</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Align self (on flex children)
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<div class="flex">
|
|
50
|
+
<div class="self-auto">Auto</div>
|
|
51
|
+
<div class="self-start">Start</div>
|
|
52
|
+
<div class="self-center">Center</div>
|
|
53
|
+
<div class="self-stretch">Stretch</div>
|
|
54
|
+
</div>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Gap
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<div class="flex gap-4">gap-4 (1rem)</div>
|
|
61
|
+
<div class="flex gap-x-2 gap-y-4">Different x/y gap</div>
|
|
62
|
+
<div class="flex gap-0">No gap</div>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Flex grow, shrink, basis
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<div class="flex">
|
|
69
|
+
<div class="w-14 flex-none">Fixed</div>
|
|
70
|
+
<div class="flex-1">Grows and shrinks</div>
|
|
71
|
+
<div class="flex-initial">Shrink only</div>
|
|
72
|
+
<div class="flex-auto">Grow/shrink with initial size</div>
|
|
73
|
+
</div>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- `flex-1` = `flex: 1 1 0%` - equal distribution
|
|
77
|
+
- `flex-initial` = `flex: 0 1 auto` - shrink, don't grow
|
|
78
|
+
- `flex-auto` = `flex: 1 1 auto` - grow/shrink from content size
|
|
79
|
+
- `flex-none` = `flex: none` - no grow or shrink
|
|
80
|
+
|
|
81
|
+
### Order
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<div class="flex">
|
|
85
|
+
<div class="order-2">Second</div>
|
|
86
|
+
<div class="order-1">First</div>
|
|
87
|
+
<div class="order-last">Last</div>
|
|
88
|
+
</div>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Key Points
|
|
92
|
+
|
|
93
|
+
- Use `flex` or `inline-flex` as container (see layout-display)
|
|
94
|
+
- Direction: `flex-row`, `flex-col`, `flex-row-reverse`, `flex-col-reverse`
|
|
95
|
+
- Justify: `justify-start`, `justify-center`, `justify-between`, `justify-evenly`
|
|
96
|
+
- Align: `items-center`, `items-start`, `items-stretch`
|
|
97
|
+
- Gap: `gap-{n}`, `gap-x-{n}`, `gap-y-{n}` (spacing scale)
|
|
98
|
+
- Item sizing: `flex-1`, `flex-none`, `flex-auto`, `flex-initial`
|
|
99
|
+
- Self alignment: `self-center`, `self-start`, etc.
|
|
100
|
+
- Safe alignment (v4.1): `justify-center-safe`, `items-center-safe` (falls back to `start` on overflow)
|
|
101
|
+
- Order: `order-{n}`, `order-first`, `order-last`
|
|
102
|
+
- **v4 note**: `flex-shrink-*` → `shrink-*`, `flex-grow-*` → `grow-*` (old names removed)
|
|
103
|
+
|
|
104
|
+
<!--
|
|
105
|
+
Source references:
|
|
106
|
+
- https://tailwindcss.com/docs/flex-direction
|
|
107
|
+
- https://tailwindcss.com/docs/justify-content
|
|
108
|
+
- https://tailwindcss.com/docs/align-items
|
|
109
|
+
- https://tailwindcss.com/docs/gap
|
|
110
|
+
- https://tailwindcss.com/docs/flex
|
|
111
|
+
- https://tailwindcss.com/docs/order
|
|
112
|
+
-->
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layout-grid
|
|
3
|
+
description: CSS Grid utilities including grid-cols, grid-rows, gap, place-items, and grid placement
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Grid
|
|
7
|
+
|
|
8
|
+
Utilities for CSS Grid layouts: columns, rows, gap, and item placement.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Grid columns and rows
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<div class="grid grid-cols-3 gap-4">3 equal columns</div>
|
|
16
|
+
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">Responsive</div>
|
|
17
|
+
<div class="grid grid-cols-none">No explicit tracks</div>
|
|
18
|
+
|
|
19
|
+
<div class="grid grid-rows-3 gap-2">3 rows</div>
|
|
20
|
+
<div class="grid grid-rows-[auto_1fr_auto]">Custom rows</div>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Custom grid template
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<div class="grid grid-cols-[200px_minmax(900px,1fr)_100px]">Custom template</div>
|
|
27
|
+
<div class="grid grid-cols-(--my-cols)">CSS variable</div>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Subgrid
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<div class="grid grid-cols-4 gap-4">
|
|
34
|
+
<div>01</div><div>02</div><div>03</div><div>04</div>
|
|
35
|
+
<div>05</div>
|
|
36
|
+
<div class="col-span-3 grid grid-cols-subgrid gap-4">
|
|
37
|
+
<div class="col-start-2">06</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Gap
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<div class="grid gap-4">Uniform gap</div>
|
|
46
|
+
<div class="grid gap-x-2 gap-y-4">Different x/y</div>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Place items (align + justify)
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<div class="grid place-items-center">Center both</div>
|
|
53
|
+
<div class="grid place-items-start">Start both</div>
|
|
54
|
+
<div class="grid items-center justify-center">Equivalent</div>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Grid placement (col/row span and start)
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<div class="grid grid-cols-4 gap-4">
|
|
61
|
+
<div class="col-span-2">Spans 2 columns</div>
|
|
62
|
+
<div class="col-start-3">Starts at col 3</div>
|
|
63
|
+
<div class="row-span-2">Spans 2 rows</div>
|
|
64
|
+
<div class="col-span-full">Full width</div>
|
|
65
|
+
</div>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Key Points
|
|
69
|
+
|
|
70
|
+
- `grid` / `inline-grid` - Grid container (see layout-display)
|
|
71
|
+
- Columns: `grid-cols-{n}`, `grid-cols-none`, `grid-cols-subgrid`, `grid-cols-[...]`
|
|
72
|
+
- Rows: `grid-rows-{n}`, `grid-rows-[...]`
|
|
73
|
+
- Gap: `gap-{n}`, `gap-x-{n}`, `gap-y-{n}`
|
|
74
|
+
- Placement: `col-span-{n}`, `col-start-{n}`, `row-span-{n}`, `row-start-{n}`
|
|
75
|
+
- `col-span-full` / `row-span-full` - span all
|
|
76
|
+
- `place-items-*` - shorthand for align + justify
|
|
77
|
+
- Use `grid-cols-[...]` for custom templates like `minmax()` or `repeat()`
|
|
78
|
+
|
|
79
|
+
<!--
|
|
80
|
+
Source references:
|
|
81
|
+
- https://tailwindcss.com/docs/grid-template-columns
|
|
82
|
+
- https://tailwindcss.com/docs/grid-template-rows
|
|
83
|
+
- https://tailwindcss.com/docs/gap
|
|
84
|
+
- https://tailwindcss.com/docs/place-items
|
|
85
|
+
- https://tailwindcss.com/docs/grid-column
|
|
86
|
+
- https://tailwindcss.com/docs/grid-row
|
|
87
|
+
-->
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layout-height
|
|
3
|
+
description: Setting element height with spacing scale, fractions, viewport units, and content-based sizing
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Height
|
|
7
|
+
|
|
8
|
+
Utilities for setting the height of an element.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Spacing scale
|
|
13
|
+
|
|
14
|
+
Use `h-<number>` utilities based on the spacing scale:
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<div class="h-24">h-24</div>
|
|
18
|
+
<div class="h-48">h-48</div>
|
|
19
|
+
<div class="h-64">h-64</div>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Percentage heights
|
|
23
|
+
|
|
24
|
+
Use `h-full` or `h-<fraction>` for percentage-based heights:
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div class="h-full">100%</div>
|
|
28
|
+
<div class="h-1/2">50%</div>
|
|
29
|
+
<div class="h-3/4">75%</div>
|
|
30
|
+
<div class="h-9/10">90%</div>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Viewport units
|
|
34
|
+
|
|
35
|
+
Use `h-screen` for full viewport height, or dynamic viewport units:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<div class="h-screen">Full viewport height (100vh)</div>
|
|
39
|
+
<div class="h-dvh">Dynamic viewport height</div>
|
|
40
|
+
<div class="h-svh">Small viewport height</div>
|
|
41
|
+
<div class="h-lvh">Large viewport height</div>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Content-based heights
|
|
45
|
+
|
|
46
|
+
Use `h-auto`, `h-fit`, `h-min`, `h-max` for content-based sizing:
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<div class="h-auto">Auto height</div>
|
|
50
|
+
<div class="h-fit">Fit content</div>
|
|
51
|
+
<div class="h-min">Min content</div>
|
|
52
|
+
<div class="h-max">Max content</div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Line height
|
|
56
|
+
|
|
57
|
+
Use `h-lh` to match line height:
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<div class="h-lh">Matches line height</div>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Size utility
|
|
64
|
+
|
|
65
|
+
Use `size-<number>` to set both width and height:
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<div class="size-16">16x16</div>
|
|
69
|
+
<div class="size-24">24x24</div>
|
|
70
|
+
<div class="size-full">100% x 100%</div>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Custom values
|
|
74
|
+
|
|
75
|
+
Use arbitrary values for custom heights:
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<div class="h-[117px]">Custom pixel height</div>
|
|
79
|
+
<div class="h-[50vh]">Custom viewport height</div>
|
|
80
|
+
<div class="h-[calc(100vh-2rem)]">Custom calculation</div>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Key Points
|
|
84
|
+
|
|
85
|
+
- Spacing scale: `h-0` through `h-96` (and beyond)
|
|
86
|
+
- Fractions: `h-1/2`, `h-1/3`, `h-2/3`, `h-1/4`, `h-3/4`, `h-9/10`
|
|
87
|
+
- Viewport units: `h-screen` (100vh), `h-dvh`, `h-svh`, `h-lvh`
|
|
88
|
+
- `h-dvh` adapts to browser UI (address bar, etc.)
|
|
89
|
+
- `h-svh` uses smallest viewport height
|
|
90
|
+
- `h-lvh` uses largest viewport height
|
|
91
|
+
- `size-*` utilities set both width and height simultaneously
|
|
92
|
+
- Use `h-auto` to reset height at specific breakpoints
|
|
93
|
+
|
|
94
|
+
<!--
|
|
95
|
+
Source references:
|
|
96
|
+
- https://tailwindcss.com/docs/height
|
|
97
|
+
-->
|