Skip to content

Tailwind CSS 4 styling rules covering CSS-first config, theme tokens, and the cn() helper for class composition.

CCM score
62 of 100
skills.sh installs
618
GitHub stars
15.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers CSS-first setup in ui/styles/globals.css with @theme, @utility, @custom-variant, and @plugin, with no tailwind.config file
  • Enforces theme token utilities over var() or hex values inside className, reserving style props and CSS variable constants for library props
  • Guides use of cn() from ui/lib/utils.ts for conditional and conflicting classes, and skips it for static class strings
  • Designed for Prowler UI and other Tailwind 4 projects that need dynamic styling, dark mode, and chart library color constants

Install

$ npx -y skills add prowler-cloud/prowler --skill tailwind-4 -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Tailwind 4 Setup (CSS-first, no tailwind.config)

  • Config lives in CSS: ui/styles/globals.css starts with @import "tailwindcss"; plus @plugin, @source, @custom-variant, @theme, @utility.
  • PostCSS plugin is @tailwindcss/postcss (ui/postcss.config.js). There is no tailwind.config.*; do not create one.
  • Design tokens are declared in @theme (--color-bg-neutral-primary: ...) and become utilities (bg-bg-neutral-primary, text-text-neutral-secondary, border-border-neutral-secondary).
  • Dark mode is class-based: @custom-variant dark (&:where(.dark, .dark *)); (toggled by next-themes).
  • New utilities use @utility name { ... }, not @layer utilities + @apply hacks.

Prowler UI: use the semantic token utilities above. Raw palette classes (bg-slate-800, bg-blue-500) appear below only as generic Tailwind examples; in ui/ they are not allowed (see prowler-ui Design System Discipline).

Styling Decision Tree

Details

Repository
github.com/prowler-cloud/prowler
Category
Frontend & UI Code
First seen
Jun 3, 2026

More from prowler-cloud/prowler

All 6

Similar to Tailwind 4

More Frontend & UI Code