tailwind-v4
यह क्या करती है
यह स्किल Tailwind CSS वर्ज़न 4 कोड सही तरीके से लिखने की गाइड है। यह उन पुराने वर्ज़न 3 पैटर्न की ओर इशारा करती है जो नए कोड में नहीं होने चाहिए।
कब इस्तेमाल करें
- ✓जब आप किसी प्रोजेक्ट में Tailwind स्टाइल लिख या बदल रहे हों।
- ✓जब आप पुराने Tailwind वर्ज़न 3 कोड को वर्ज़न 4 पर ले जाना चाहें।
- ✓जब आप नई कॉन्फ़िगरेशन शैली में अपने थीम रंग सेट करना चाहें।
Skill का लिंक
https://github.com/mastra-ai/mastra/blob/main/.claude/skills/tailwind-v4/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस कॉम्पोनेंट की स्टाइल Tailwind वर्ज़न 4 सिंटैक्स में बदलिए और पुराने वर्ज़न 3 पैटर्न हटाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट JavaScript कॉन्फ़िग फ़ाइल की जगह Tailwind वर्ज़न 4 की CSS-आधारित कॉन्फ़िगरेशन इस्तेमाल करता है, और यूटिलिटी इस्तेमाल करने से पहले जांचता है कि वे प्रोजेक्ट के वर्ज़न में मौजूद हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Tailwind CSS v4
How to write idiomatic Tailwind v4 and spot v3-era syntax that still compiles but should not appear in new code.
Version and sources
Check the pinned version before using recent utilities: the playground packages pin tailwindcss in their package.json (4.3.3 at the time of writing, including v4.3 utilities like scrollbar-*, zoom-*, and tab-*). When unsure whether a utility, variant, or directive exists in the pinned version, verify against the docs instead of guessing:
- Utility/variant reference: https://tailwindcss.com/docs
- v3 → v4 migration: https://tailwindcss.com/docs/upgrade-guide
- What each minor added: https://tailwindcss.com/blog/tailwindcss-v4 (and
/tailwindcss-v4-1,/tailwindcss-v4-3, ...)
CSS-first configuration
Tailwind v4 is configured in CSS, not JavaScript.
| Use | Never use (v3-era) |
|---|---|
@import 'tailwindcss' |
@tailwind base/components/utilities |
@theme { --color-x: ...; } for tokens that should generate utilities |
tailwind.config.ts for new work |
@utility name { ... } for custom utilities (works with variants) |
@layer utilities { .name { ... } } |
@custom-variant dark (&:is(.dark *)) |
JS plugins / addVariant |
@source "path" / @source inline("...") for extra sources / safelisting |
content array / safelist config |
@variant dark { ... } to apply a Tailwind variant inside custom CSS |
duplicating media queries / selectors |
@reference "app.css" for @apply in scoped styles (Vue, CSS Modules) |
duplicating stylesheet imports |
var(--color-x) in CSS, getComputedStyle in JS |
theme() function, resolveConfig |
@config "…" / @plugin "…" only for existing JS-config integrations |
adding new JS configs or plugins |
@theme variables are API: each one emits a native CSS variable AND generates utilities (--color-* → bg-*/text-*/border-*/..., --text-* → text-*, --shadow-* → shadow-*, --animate-* → animate-*, --breakpoint-* → responsive variants). A plain :root { --x: ...; } variable generates nothing — use it for runtime-only values. When a token's value references another variable (--color-x: var(--y)), declare it in @theme inline so the utility resolves the reference at the declaration site. In custom CSS, --alpha(var(--color-x) / 50%) and --spacing(4) replace v3 theme() math.
v3 → v4 renames
Bare names shifted one step down the scale, so the v3 spelling silently renders smaller or lighter:
| v3 | v4 |
|---|---|
shadow-sm / shadow |
shadow-xs / shadow-sm |
drop-shadow-sm / drop-shadow |
drop-shadow-xs / drop-shadow-sm |
blur-sm / blur |
blur-xs / blur-sm |
rounded-sm / rounded |
rounded-xs / rounded-sm |
outline-none |
outline-hidden (a11y-safe); outline-none now truly removes it |
ring (3px) |
ring-3; the default ring is now 1px currentColor |
bg-opacity-50, text-opacity-* |
opacity modifier: bg-black/50, text-white/50 |
bg-gradient-to-r |
bg-linear-to-r (plus new bg-conic-*, bg-radial-*) |
!bg-red-500 (prefix) |
bg-red-500! (suffix) |
flex-shrink-* / flex-grow-* |
shrink-* / grow-* |
bg-[--var] |
bg-(--var); brackets now require bg-[var(--var)] |
grid-cols-[a,b] (commas) |
underscores: grid-cols-[max-content_auto] |
Prefer generated utilities over arbitrary values
The spacing scale is infinite — every number compiles via calc(var(--spacing) * n) — so mo
अक्सर पूछे जाने वाले सवाल
क्या प्रोजेक्ट को अब भी tailwind कॉन्फ़िग फ़ाइल चाहिए?
नए काम के लिए कॉन्फ़िगरेशन JavaScript कॉन्फ़िग फ़ाइल की जगह CSS में लिखी जाती है।
उसे कैसे पता चलता है कि कौन-से फ़ीचर उपलब्ध हैं?
वह प्रोजेक्ट में लगे Tailwind वर्ज़न की जांच करता है और अनिश्चित होने पर आधिकारिक दस्तावेज़ देखता है।
क्या पुराना सिंटैक्स टूटा हुआ है?
उसका ज़्यादातर हिस्सा अब भी कम्पाइल होता है, लेकिन यह स्किल नए कोड को उससे दूर रखती है।
जानकारी
लेखक का मूल विवरण
Tailwind CSS v4 usage guide and v3-to-v4 differences. This skill should be used when writing, reviewing, or refactoring any Tailwind CSS code in this repo. Triggers on tasks involving Tailwind classes, @theme blocks, CSS-first configuration, or cleanup of v3-era syntax.
repo: mastra-ai/mastra
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9366
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
debugging-difficult-bugs
29kयह आपके एजेंट को कठिन बग ढूंढने में मदद करती है, असली प्रोग्राम के रनटाइम लॉग से, केवल टेस्ट देखकर अंदाज़ा लगाने की जगह।
mastra-frontend
29kयह आपके एजेंट को Mastra playground डिज़ाइन सिस्टम के तैयार कॉम्पोनेंट जोड़कर ऐप स्क्रीन बनाने में मदद करती है, शुरू से स्टाइल करने की जगह।
pr-explainer
29kयह आपके एजेंट को पुल रिक्वेस्ट को एक साफ़, स्व-निहित HTML पेज में बदलने में मदद करती है, जो रिव्यूअर को बदलाव समझाए।
pr-splitter
29kयह आपके एजेंट को एक बड़ी, उलझी पुल रिक्वेस्ट को छोटी, रिव्यू योग्य पुल रिक्वेस्ट में बांटने में मदद करती है, मूल काम सुरक्षित रखते हुए।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।