Skip to main content 홈 크리에이터 impertio-studio tailwindcss-claude-skill-package tailwind-syntax-utility-classes
tailwind-syntax-utility-classes Use when writing Tailwind markup and you need to recall or verify the vocabulary of base utility families (spacing, color, typography, layout, flexbox, grid, sizing, border, background, effects). Also use when diagnosing why a class name does not produce expected styling, or when porting from a different framework and looking up the Tailwind equivalent. Prevents incorrect class names that the content scanner silently ignores, the v4 shadow-scale shift confusion where `shadow-sm` is smaller than v3's `shadow-sm` because `shadow-xs` was inserted, and the "I thought sm: meant small screens only" responsive trap (see [tailwind-syntax-responsive] for the full responsive treatment). Covers : the canonical class vocabulary for the ten base utility families with v3 and v4 differences flagged inline; the value scales (spacing 0..96, type xs..9xl, shadow 2xs..2xl, color 50..950, etc.); v4 dynamic spacing utilities that accept any integer; v4 opacity modifier syntax (`bg-red-500/50`); the official 22-family color palett
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Impertio-Studio/TailwindCSS-Claude-Skill-Package --skill tailwind-syntax-utility-classes명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... 이 저장소의 다른 Skills tailwind-errors-specificity Use when a Tailwind utility class is in the compiled CSS but does NOT visually override a component class or a third-party rule, when @apply produces output that does not behave like the utility applied to a real element, when a custom utility you authored inside CSS does not respect responsive or hover variants, when plugin-emitted classes get overridden by your own classes in unexpected ways, or when you reach for !important and want to know the right syntax for v3 vs v4. Prevents the unlayered-CSS trap (custom CSS written outside @layer wins over any utility because unlayered styles defeat the cascade), the @apply !important-strip trap (v3 silently removes !important from utilities pulled in via @apply), the v3-vs-v4-important syntax flip (v3 prefix !bg-red-500, v4 suffix bg-red-500!), the wrong-layer trap (custom CSS in @layer base when you wanted utility-level priority), the plugin-order trap (v3 plugins array : LAST entry wins when two plugins emit the same class), and the same-property in @apply trap (
tailwind-errors-v4-migration Use when upgrading a Tailwind CSS v3 codebase to v4 and hitting silent visual regressions, build errors after switching imports, or unexpected behavior changes that the codemod did not catch. Catalogs every default-behavior change between v3 and v4 with symptoms, root causes, and surgical fixes. Prevents the variant-order trap (v3 right-to-left first:*:pt-0 silently becomes wrong in v4 left-to-right where the correct form is *:first:pt-0), the invisible-borders trap (v4 default border-color flipped from gray-200 to currentColor so every border now renders in the parent text color), the thin-ring trap (default ring width dropped from 3px to 1px so focus rings disappear under existing UI), the shadow-shift trap (shadow-sm in v3 became shadow-xs in v4, shadow in v3 became shadow-sm in v4, same shift applies to blur, drop-shadow, backdrop-blur, rounded), the removed-config trap (corePlugins / safelist / separator no longer exist in JS config), the bg-opacity-removed trap (bg-opacity-50 no longer works, use bg-bla
tailwind-agents-validator Use when reviewing a Tailwind CSS codebase for cross-rule violations, performing a pre-PR audit of changes that touch styling, validating a v3-to-v4 migration result, or running a periodic codebase health check across utility classes, plugin authoring, and configuration files. The agent acts as a Tailwind-specific code reviewer that enforces every rule documented in the sibling skills of this package, producing an actionable report that cites the authoritative sibling skill for each finding. Prevents the four highest-impact Tailwind code-review misses: dynamic template-literal class strings that compile cleanly but emit no CSS in production, scoped @apply blocks in Vue/Svelte/CSS-modules without @reference under v4, v3-only config keys (corePlugins, safelist, separator) silently ignored after a v4 upgrade, and bare border/ring/placeholder usage inheriting the wrong default colour post-migration. Covers the full rule catalogue (no dynamic class strings, no scoped @apply without @reference, no v3 keys in v4 con
name tailwind-syntax-utility-classes description Use when writing Tailwind markup and you need to recall or verify the vocabulary of base utility families (spacing, color, typography, layout, flexbox, grid, sizing, border, background, effects). Also use when diagnosing why a class name does not produce expected styling, or when porting from a different framework and looking up the Tailwind equivalent. Prevents incorrect class names that the content scanner silently ignores, the v4 shadow-scale shift confusion where `shadow-sm` is smaller than v3's `shadow-sm` because `shadow-xs` was inserted, and the "I thought sm: meant small screens only" responsive trap (see [tailwind-syntax-responsive] for the full responsive treatment). Covers : the canonical class vocabulary for the ten base utility families with v3 and v4 differences flagged inline; the value scales (spacing 0..96, type xs..9xl, shadow 2xs..2xl, color 50..950, etc.); v4 dynamic spacing utilities that accept any integer; v4 opacity modifier syntax (`bg-red-500/50`); the official 22-family color palette in v4 oklch. Keywords: utility classes, padding, margin, p-4, px-2, m-auto, gap-4, bg-red-500, text-white, text-lg, font-bold, flex, grid, grid-cols-3, flex-1, justify-center, items-center, w-full, h-screen, rounded-md, shadow-md, shadow-xs, opacity-50, what class do I need, Tailwind cheat sheet, how do I center, how do I make 3 columns, blank screen no styling, class not generated, shadow looks different after upgrade, shadow scale changed, why is shadow smaller now, default color palette, how many shades does Tailwind have, bg opacity, color/50, slate gray zinc.
license MIT compatibility Designed for Claude Code. Requires Tailwind CSS v3.4 or v4.0+. metadata {"author":"OpenAEC-Foundation","version":"1.0"}
Tailwind CSS : Base Utility Classes
The canonical vocabulary. Every utility documented here is a literal token Tailwind generates from theme tokens. ALWAYS write classes as complete literals; see [tailwind-core-architecture] for why partial token construction breaks the content scanner.
Quick Reference
The ten base utility families
Family Examples Coverage in this skill Spacing p-4, px-2, m-auto, mt-8, space-y-4, gap-6section 1 Color bg-red-500, text-white, border-slate-200, ring-blue-500/50section 2 Typography text-lg, font-bold, tracking-tight, leading-relaxedsection 3 Layout (display + position) flex, grid, block, hidden, absolute, top-0, z-10section 4 Flexbox flex-row, justify-center, items-center, flex-1, shrink-0section 5 Grid grid-cols-3, col-span-2, grid-rows-2, grid-flow-col, auto-cols-frsection 6 Sizing w-full, h-screen, min-w-0, max-h-96, size-10section 7 Border border, border-2, rounded-md, divide-ysection 8 Background bg-white, , ,
bg-[url('/img.png')]
bg-cover
bg-center
Effects shadow-md, opacity-75, mix-blend-multiply, backdrop-blur-smsection 10
Three invariants
ALWAYS write class names as complete literal tokens. NEVER assemble them dynamically.
ALWAYS read responsive prefixes (sm:, md:, ...) as "and up". See [tailwind-syntax-responsive].
ALWAYS check the v4 callouts in this skill before assuming a v3 utility name still applies.
v4 changes affecting base utilities (callouts)
Shadow scale shifted (BREAKING) : v4 inserted shadow-2xs and shadow-xs. v3 shadow-sm is approximately v4 shadow-md. See section 10.
Same shift applies to blur-*, rounded-*, drop-shadow-*, backdrop-blur-* (-xs inserted below -sm).
Opacity utilities removed : v4 removed bg-opacity-50, text-opacity-*, border-opacity-*, divide-opacity-*, ring-opacity-*, placeholder-opacity-*. ALWAYS use the slash syntax bg-red-500/50 instead.
Gradient family renamed : v3 bg-gradient-to-r becomes v4 bg-linear-to-r. See [tailwind-syntax-gradients].
Flex shorthand changes : v3 flex-shrink-*, flex-grow-* become v4 shrink-*, grow-*.
Text overflow : v3 overflow-ellipsis becomes v4 text-ellipsis.
Important modifier position : v3 !font-bold becomes v4 font-bold!.
Dynamic spacing : v4 generates p-{any-integer}, m-{any-integer}, w-{any-integer}, grid-cols-{any-integer} automatically; v3 was scale-limited.
Default color palette : v4 ships in oklch wide-gamut with 22 family names: 9 neutrals (slate, gray, zinc, neutral, stone, taupe, mauve, mist, olive) and 13 colors (red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose) plus black and white.
1. Spacing
Padding Class Property Notes p-<n>padding: calc(var(--spacing) * <n>)All sides px-<n> / py-<n>inline / block padding Horizontal / vertical pt-<n> / pr-<n> / pb-<n> / pl-<n>single-side Top / right / bottom / left ps-<n> / pe-<n>logical (start / end) RTL-aware p-[<value>]arbitrary p-[37px], p-[1.5em]p-(--var)CSS variable v4 only
Margin Class Property Notes m-<n>marginAll sides mx-<n> / my-<n>horizontal / vertical mt-<n> / mr-<n> / mb-<n> / ml-<n>single-side ms-<n> / me-<n>logical RTL-aware -m-<n>, -mt-<n>, etc.negative ALWAYS prefix with - m-automargin: autoCentering trick with mx-auto
Spacing scale (<n> values) 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96.
In v4 ANY integer works because spacing is calc(var(--spacing) * <n>) with --spacing: 0.25rem by default. p-17, m-23, w-29 ALL emit valid CSS in v4.
Gap and space-between Class Property gap-<n>gap (flex + grid both)gap-x-<n> / gap-y-<n>column-gap / row-gap space-x-<n> / space-y-<n>gap between siblings (legacy; prefer gap-* with flex or grid)
ALWAYS prefer flex flex-col gap-<n> over space-y-<n> per the v4 upgrade-guide recommendation; the space-* family uses fragile sibling selectors and changed behaviour in v4.
2. Color
Color palette (v4 oklch)
Neutrals (9) : slate, gray, zinc, neutral, stone, taupe, mauve, mist, olive
Hues (13) : red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
Plus black, white, transparent, current (currentColor), inherit
Each named family has 11 shades : 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950.
Color utilities by property Class Property text-<color>-<shade>colorbg-<color>-<shade>background-colorborder-<color>-<shade>border-colorborder-{t,r,b,l}-<color>-<shade>per-side border colour outline-<color>-<shade>outline-colorring-<color>-<shade>box-shadow ring colourdivide-<color>-<shade>sibling-border colour accent-<color>-<shade>accent-color (form controls)caret-<color>-<shade>caret-color (text input)decoration-<color>-<shade>text-decoration-colorfill-<color>-<shade>SVG fill stroke-<color>-<shade>SVG stroke placeholder-<color>-<shade>::placeholder { color }from-<color>-<shade> / via- / to-gradient stops
Opacity modifier (v4 + v3.3+) ALWAYS use the slash syntax :
<div class ="bg-red-500/50" > 50% opacity background</div >
<div class ="text-white/[0.85]" > 85% with arbitrary precision</div >
In v4 the bg-opacity-*, text-opacity-*, etc. utility families are REMOVED . NEVER write bg-red-500 bg-opacity-50 in v4 code.
Arbitrary and variable colors <div class ="bg-[#1da1f2]" > arbitrary hex</div >
<div class ="bg-(--brand-color)" > v4 CSS variable</div >
<div class ="bg-[var(--brand-color)]" > v3 CSS variable</div >
3. Typography Class Property text-<size>font-size + paired line-heighttext-<size>/<leading>font-size + custom line-height (e.g., text-sm/6)font-<family>font-family (defaults : sans, serif, mono)font-<weight>font-weightleading-<value>line-heighttracking-<value>letter-spacingtext-<align>text-align : left, center, right, justify, start, enduppercase, lowercase, capitalize, normal-casetext-transformitalic, not-italicfont-styleunderline, overline, line-through, no-underlinetext-decoration-linedecoration-<style>text-decoration-style : solid, dotted, dashed, wavy, doubledecoration-<thickness>text-decoration-thickness : auto, from-font, 0, 1, 2, 4, 8whitespace-<value>white-space : normal, nowrap, pre, pre-line, pre-wrap, break-spacestext-ellipsis, text-cliptext-overflow (v4; v3 used overflow-ellipsis)truncatethree-in-one : overflow: hidden, text-overflow: ellipsis, white-space: nowrap
Font sizes (v4 defaults) Class Font size Line height text-xs0.75rem (12px) calc(1 / 0.75) text-sm0.875rem (14px) calc(1.25 / 0.875) text-base1rem (16px) calc(1.5 / 1) text-lg1.125rem (18px) calc(1.75 / 1.125) text-xl1.25rem (20px) calc(1.75 / 1.25) text-2xl1.5rem (24px) calc(2 / 1.5) text-3xl1.875rem (30px) calc(2.25 / 1.875) text-4xl2.25rem (36px) calc(2.5 / 2.25) text-5xl3rem (48px) 1 text-6xl3.75rem (60px) 1 text-7xl4.5rem (72px) 1 text-8xl6rem (96px) 1 text-9xl8rem (128px) 1
Font weights font-thin (100), font-extralight (200), font-light (300), font-normal (400), font-medium (500), font-semibold (600), font-bold (700), font-extrabold (800), font-black (900).
Letter spacing tracking-tighter (-0.05em), tracking-tight (-0.025em), tracking-normal (0), tracking-wide (0.025em), tracking-wider (0.05em), tracking-widest (0.1em).
Line height (standalone) leading-none (1), leading-tight (1.25), leading-snug (1.375), leading-normal (1.5), leading-relaxed (1.625), leading-loose (2). Arbitrary : leading-[1.2].
4. Layout (display + position + z-index) Class Property block, inline-block, inline, flex, inline-flex, grid, inline-grid, table, inline-table, table-row, table-cell, flow-root, contents, hidden, list-itemdisplaystatic, fixed, absolute, relative, stickypositiontop-<n> / right-<n> / bottom-<n> / left-<n>per-side offset (uses spacing scale) inset-<n>shorthand for all four sides inset-x-<n> / inset-y-<n>horizontal / vertical z-<n>z-index : 0, 10, 20, 30, 40, 50, auto (v4 dynamic : any integer)overflow-<value>auto, hidden, clip, visible, scrolloverflow-x-<value> / overflow-y-<value>per-axis visible, invisible, collapsevisibility
5. Flexbox Class Property flex-row, flex-row-reverse, flex-col, flex-col-reverseflex-directionflex-wrap, flex-wrap-reverse, flex-nowrapflex-wrapflex-1, flex-auto, flex-initial, flex-noneflex shorthandflex-<n>, flex-<fraction>, flex-[<value>], flex-(--var)arbitrary flex values grow, grow-0, grow-<n> (v4)flex-grow (v3 used flex-grow-*)shrink, shrink-0, shrink-<n> (v4)flex-shrink (v3 used flex-shrink-*)basis-<n>, basis-<fraction>, basis-full, basis-autoflex-basisorder-<n>, order-first, order-last, order-noneorderjustify-<value>justify-content : start, end, center, between, around, evenly, stretch, normalitems-<value>align-items : start, end, center, baseline, stretch, last-baselinecontent-<value>align-content : start, end, center, between, around, evenly, stretch, normal, baselineself-<value>align-self : auto, start, end, center, stretch, baseline
6. Grid Class Property grid-cols-<n>grid-template-columns: repeat(<n>, minmax(0, 1fr)) (v4 any integer)grid-cols-none, grid-cols-subgrid, grid-cols-[<value>]non-numeric grid-rows-<n>, grid-rows-none, grid-rows-subgridrows version col-span-<n>, col-span-full, col-start-<n>, col-end-<n>column placement row-span-<n>, row-span-full, row-start-<n>, row-end-<n>row placement grid-flow-row, grid-flow-col, grid-flow-row-dense, grid-flow-col-dense, grid-flow-densegrid-auto-flowauto-cols-auto, auto-cols-min, auto-cols-max, auto-cols-frgrid-auto-columnsauto-rows-auto, auto-rows-min, auto-rows-max, auto-rows-frgrid-auto-rowsplace-content-<value>, place-items-<value>, place-self-<value>combined *-content, *-items, *-self
7. Sizing Class Property w-<n>widthh-<n>heightsize-<n>shorthand : width + height (v3.4+ and v4) min-w-<n>, max-w-<n>, min-h-<n>, max-h-<n>min/max width/height w-full, w-screen, w-svw, w-lvw, w-dvw, w-min, w-max, w-fit, w-autonamed widths h-full, h-screen, h-svh, h-lvh, h-dvh, h-min, h-max, h-fit, h-autonamed heights w-<fraction> (e.g., w-1/2, w-2/3, w-5/12)fractional widths max-w-xs, max-w-sm, ..., max-w-7xl, max-w-prose, max-w-screen-mdcontainer scale aspect-square, aspect-video, aspect-[16/9], aspect-autoaspect-ratio
8. Border Class Property border, border-0, border-2, border-4, border-8, border-<n>border-widthborder-x-<n>, border-y-<n>, border-t-<n>, border-r-<n>, border-b-<n>, border-l-<n>per-axis / side border-<color>-<shade>border-color (see section 2)border-{style}border-style : solid, dashed, dotted, double, hidden, nonerounded, rounded-none, rounded-xs, rounded-sm, rounded-md, rounded-lg, rounded-xl, rounded-2xl, rounded-3xl, rounded-fullborder-radiusrounded-t-*, rounded-r-*, rounded-b-*, rounded-l-*per-side radius rounded-tl-*, rounded-tr-*, rounded-br-*, rounded-bl-*per-corner divide-x-<n>, divide-y-<n>, divide-<color>sibling-border between flex/grid children outline, outline-<n>, outline-<style>, outline-<color>, outline-offset-<n>outline family ring-<n>, ring-<color>-<shade>, ring-offset-<n>, ring-insetbox-shadow-based ring
v3 vs v4 border-color and ring-width
v3 default border color : gray-200. v4 default : currentColor. ALWAYS add an explicit border-<color>-<shade> on bordered elements when migrating, OR add a shim in @layer base.
v3 default ring width : 3px. v4 default ring width : 1px. ALWAYS use ring-3 to preserve v3 behaviour, OR a shim.
See [tailwind-errors-v4-migration].
9. Background Class Property bg-<color>-<shade>background-color (see section 2)bg-[url('/img/hero.png')], bg-(image:--my-img)background-image arbitrarybg-none, bg-linear-to-r, bg-conic-*, bg-radial-*gradient utilities (see [tailwind-syntax-gradients]) bg-cover, bg-contain, bg-autobackground-sizebg-[length:200px_100px]arbitrary size with type hint bg-center, bg-top, bg-right, etc.background-positionbg-repeat, bg-no-repeat, bg-repeat-x, bg-repeat-y, bg-repeat-space, bg-repeat-roundbackground-repeatbg-fixed, bg-local, bg-scrollbackground-attachmentbg-clip-border, bg-clip-padding, bg-clip-content, bg-clip-textbackground-clipbg-origin-border, bg-origin-padding, bg-origin-contentbackground-origin
10. Effects
Shadow (the v4 scale-shift trap) v4 class v3 equivalent Notes shadow-2xsn/a v4-only; smallest shadow-xsn/a (closest : v3 shadow-sm) INSERTED shadow-smv3 shadow (no suffix) shifted up shadow-mdv3 shadow-md (same name, slightly different value) shadow-lgv3 shadow-lg shadow-xlv3 shadow-xl shadow-2xlv3 shadow-2xl shadow-noneshadow-noneunchanged shadow-[<value>]arbitrary shadow-<color>-<shade>shadow color colored shadows
ALWAYS read v4 shadow-sm as roughly equivalent to v3's shadow (default). NEVER assume v4 shadow-sm matches v3 shadow-sm visually : v3's shadow-sm is closer to v4's shadow-xs.
The same shift applies to blur-*, rounded-*, drop-shadow-*, backdrop-blur-* : v4 inserted -xs below -sm.
Inset shadow (v4-only) inset-shadow-2xs, inset-shadow-xs, inset-shadow-sm, inset-shadow-none, inset-shadow-[<value>], inset-shadow-<color>-<shade>. See [tailwind-syntax-modern-utilities].
Other effects Class Property opacity-<n>opacity : 0, 5, 10, 15, ..., 100; v4 dynamic any integermix-blend-<mode>mix-blend-modebg-blend-<mode>background-blend-modeblur-<size>, blur-[<value>], blur-nonefilter: blur(...)brightness-<n>, contrast-<n>, grayscale, hue-rotate-<n>, invert, saturate-<n>, sepiafilter family backdrop-blur-<size>backdrop-filter: blur(...)backdrop-brightness-<n>, etc.backdrop-filter family drop-shadow-<size>, drop-shadow-[<value>], drop-shadow-<color>-<shade>filter: drop-shadow(...)
Anti-patterns (summary; full list in references/anti-patterns.md)
NEVER use removed v4 utilities : bg-opacity-50, text-opacity-*, border-opacity-*. ALWAYS use slash syntax bg-red-500/50.
NEVER assume shadow-sm is identical between v3 and v4. v4 inserted shadow-xs, shifting the entire scale.
NEVER write flex-shrink-0 or flex-grow-1 in v4 code. ALWAYS use shrink-0 and grow.
NEVER write bg-gradient-to-r in v4 code. ALWAYS use bg-linear-to-r.
NEVER write overflow-ellipsis in v4. ALWAYS use text-ellipsis.
NEVER assume border alone gives a visible border in v4 : the default border color is currentColor, not gray-200. ALWAYS add an explicit border-<color>-<shade>.
Reference Links
Cross-references
Sources