Tailwind CSS v4
Strict utility-first Tailwind CSS v4 frontends. Blocks introduced v3 patterns (V3-01–V3-15) and plain-CSS styling outside approved boundaries (CSS-01–CSS-06); warns on advisories (Q); missing evidence never blocks.
Set this profile
ccpp cpo profile set tailwind-v4Inside Claude Code, prefix the command with ! to run it in the session. Downloading a profile needs a Builder or Team plan; listing them does not.
Policies
39 policies, grouped by what they guard.
Framework conventions 7
Routing, server and client boundaries, hooks and plugins the way the framework expects them.
q-01-duplicate-framework-importQ-01 · A style sheet loads Tailwind once: no second @import \"tailwindcss\" nor full import plus split imports
q-02-vite-pluginQ-02 · A Vite project integrates Tailwind with @tailwindcss/vite rather than @tailwindcss/postcss
q-03-redundant-pipelineQ-03 · Tailwind's pipeline handles imports, prefixes and nesting: no new postcss-import/autoprefixer/nesting pass, no Tailwind in Sass/Less
q-08-source-pathsQ-08 · @source and source(...) paths resolve from the style sheet to an existing location
q-11-extension-structureQ-11 · Tailwind extensions stay well-formed: top-level @utility/@theme, no empty @utility, only custom properties in @theme
q-12-reference-contextQ-12 · Isolated CSS shares Tailwind's context with @reference instead of missing it or importing it again
q-25-formatter-entrypointQ-25 · The Tailwind Prettier plugin points at the v4 CSS entry (tailwindStylesheet) and loads last
Versions & deprecated APIs 15
Code matches the installed version, without removed, renamed or deprecated APIs.
q-26-version-featuresQ-26 · New utilities and directives exist in the installed Tailwind minor (v4.1 features on a v4.0 install)
v3-02-legacy-directivesV3-02 · Style sheets import Tailwind with v4 entrypoints: no new @tailwind, @screen or @variants directive
v3-03-postcss-pluginV3-03 · PostCSS runs Tailwind through @tailwindcss/postcss, never the core tailwindcss package as a plugin
v3-04-legacy-cliV3-04 · The Tailwind CLI is @tailwindcss/cli: no v3 init workflow, no core-package CLI through a package runner
v3-05-js-configV3-05 · Configuration stays CSS-first: no new or expanded tailwind.config.* nor @config outside an approved bridge
v3-06-unsupported-config-optionsV3-06 · No corePlugins, safelist or separator in a Tailwind JavaScript configuration, bridge or not
v3-07-opacity-utilitiesV3-07 · Colors take opacity modifiers: no removed *-opacity-* utility
v3-08-flex-sizingV3-08 · Flex sizing uses grow/shrink, not the legacy flex-grow/flex-shrink names
v3-09-overflow-decorationV3-09 · Text overflow and box decoration use the current utility names
v3-10-variable-shorthandV3-10 · Arbitrary values name CSS variables explicitly: no bare [--var] shorthand
v3-11-prefix-positionV3-11 · With a prefix, utilities use the v4 form: prefix first, as a variant (tw:…)
v3-12-leading-importantV3-12 · The important modifier goes at the end of a utility (flex!), never at the start
v3-13-comma-valuesV3-13 · grid-cols/grid-rows/object arbitrary values separate words with underscores, not top-level commas
v3-14-resolve-configV3-14 · No import of the removed tailwindcss/resolveConfig
v3-15-gradient-namesV3-15 · Directional gradients use bg-linear-to-*, not the legacy bg-gradient-to-*
UI & styling 15
Markup, styles, images and accessibility of web interfaces.
css-01-utility-firstCSS-01 · Ordinary UI is styled with utilities: no new presentation rule or @apply in application style sheets
css-02-component-stylesCSS-02 · Component files follow the same rule: no presentation in CSS modules, component <style> blocks or styled-jsx
css-03-inline-styleCSS-03 · Inline styles carry runtime custom properties only: no ordinary property in style attributes or style props
css-04-programmatic-stylesCSS-04 · Scripts do not bypass utilities: no DOM style writes, injected style sheets or CSS-in-JS presentation
css-05-state-stylesCSS-05 · UI states, queries and themes are utility variants: no new rule under @media/@supports/@container, pseudo-classes or theme selectors
css-06-reachable-cssCSS-06 · No new import makes local plain-CSS presentation reachable (JS/TS imports, @import, <link>, <style src>)
q-05-theme-inlineQ-05 · A theme token aliasing a variable redefined in a narrower scope uses @theme inline
q-07-dynamic-classesQ-07 · Class names are complete literals Tailwind can detect: no utility assembled from fragments (bg-${color}-500)
q-13-theme-functionQ-13 · Declarations read theme values with var(--…), not the deprecated theme() function
q-14-conflicting-utilitiesQ-14 · One class string does not set the same property twice in the same context (flex grid, absolute relative)
q-16-importantQ-16 · Important modifiers (utility!, @import … important) are new only for a documented specificity need
q-18-visible-focusQ-18 · An interactive element that removes its focus outline gets a visible focus style
q-19-transform-resetQ-19 · Resetting scale, rotate or translate uses their own reset utilities, not transform-none
q-21-breakpoint-unitsQ-21 · Breakpoint tokens share one unit, so variants sort predictably
q-22-dark-variantQ-22 · A script toggling a dark class or theme attribute has a matching @custom-variant dark in the CSS entry
Dependencies & toolchain 2
Packages change through the package manager, lockfiles stay consistent and the project's tools are used.
v3-01-tailwind-major-installV3-01 · No package-manager command installs or runs Tailwind CSS major 3 or earlier
v3-01-tailwind-majorV3-01 · A governed package keeps Tailwind CSS major 4: no dependency, override or resolution on major 3 or earlier