No slash command · from fuse-tailwindcss
Documents Tailwind CSS v4.3's CSS-first configuration directives including @theme, @utility, @variant, @apply, @source, and @config for defining theme tokens, custom utilities, and variants without a config.js file.
Ships in fuse-tailwindcss. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Also covers dark-mode variant setup, responsive breakpoints via @theme, CSS layer hierarchy (theme, base, components, utilities), and plugin integration — the full CSS-first replacement for tailwind.config.js.
Tailwind CSS v4 (since v4.0; current stable v4.3) uses a CSS-first approach that eliminates the need for a traditional tailwind.config.js file. All configuration is now done directly in your CSS files via specialized directives.
Entry point to load Tailwind CSS. Place at the beginning of your main CSS file.
@import "tailwindcss";
This directive automatically loads:
Directive to define or customize theme values via CSS custom properties.
@theme {
--color-primary: #3b82f6;
--color-secondary: #ef4444;
--spacing-custom: 2.5rem;
--radius-lg: 1rem;
}
Variables are accessible in generated utilities:
--color-* → classes bg-primary, text-primary, etc.--spacing-* → classes p-custom, m-custom, etc.--radius-* → classes rounded-lg, etc.Directive to include additional source files with glob patterns.
@source "./routes/**/*.{ts,tsx}";
@source "./components/**/*.{tsx,jsx}";
@source "../packages/ui/src/**/*.{ts,tsx}";
Tailwind will scan these files to generate utilities used in your project.
Directives to create custom utilities and variants.
@utility truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Define a new variant with @custom-variant */
@custom-variant theme-midnight (&:where([data-theme="midnight"] *));
/* Apply an existing variant inside CSS with @variant
(stacked `hover:focus` and compound `hover, focus` forms since v4.3) */
.card {
@variant hover:focus {
background: var(--color-sky-600);
}
}
Directive to apply Tailwind classes in your custom CSS rules.
.btn {
@apply px-4 py-2 rounded-lg font-semibold;
}
.btn-primary {
@apply bg-blue-500 text-white hover:bg-blue-600;
}
Directive to load external configuration if needed.
@config "./tailwind.config.js";
(Optional in v4, mainly used for backward compatibility)
Dark mode configuration in Tailwind v4.3:
@import "tailwindcss";
/* Default: `dark:` follows prefers-color-scheme — no config needed */
Or via manual class (override the dark variant with @custom-variant):
@custom-variant dark (&:where(.dark, .dark *));
Breakpoints are defined via @theme:
@theme {
--breakpoint-sm: 640px;
--breakpoint-md: 768px;
--breakpoint-lg: 1024px;
--breakpoint-xl: 1280px;
--breakpoint-2xl: 1536px;
}
Responsive variants are used with utilities:
<div class="text-sm md:text-base lg:text-lg"></div>
@layer theme, base, components, utilities;
@import "tailwindcss";
/* Your customizations */
@layer components {
.btn { @apply px-4 py-2 rounded; }
}
@layer utilities {
.text-shadow { text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
}
Load Tailwind plugins:
@import "tailwindcss";
@plugin "flowbite/plugin";
@source "../node_modules/flowbite";
In CSS-first, import and declaration order determines specificity:
@import "tailwindcss" - Base utilities@theme { ... } - Theme variables@layer components { ... } - Custom components@layer utilities { ... } - Custom utilitiesSee specific files for:
theme.md - Complete theme variable configurationdirectives.md - Syntax and examples of all directivesconfig.md - Advanced configuration and use casesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tailwind-config, css-first, theme-tokens, custom-utilities, variants
npx claudepluginhub fusengine/claude-plugins --plugin fuse-tailwindcss16 skills in this plugin
/tailwindcss-accessibilityUse when implementing keyboard-accessible components, screen-reader-only content, prefers-reduced-motion support, or WCAG 2.2 AA/AAA compliance./tailwindcss-backgroundsUse when styling background colors, building linear/radial/conic gradients, setting background images/position/size, or blend modes./tailwindcss-bordersUse when styling element borders, rounded corners, focus outlines/rings, or divide-* separators between children.Other plugins' skills for the same job