From nuxt-modern-dev
Use when styling Nuxt or Vue UI, migrating from Tailwind 3, configuring @tailwindcss/vite, writing utility classes, or tempted to add custom CSS or inline styles.
How this skill is triggered — by the user, by Claude, or both
Slash command
/nuxt-modern-dev:tailwindcss4The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Baseline:** Tailwind 4.x via `@tailwindcss/vite`. Confirm the exact version from the repository lockfile.
Baseline: Tailwind 4.x via @tailwindcss/vite. Confirm the exact version from the repository lockfile.
| ALWAYS | NEVER |
|---|---|
| Utility classes in templates | style="..." or :style for layout/color/spacing |
@tailwindcss/vite plugin | @nuxtjs/tailwindcss module (v3 path) |
CSS @theme for design tokens | New tailwind.config.js as primary config |
| Extract repeated UI to components | Large @apply blocks as a style system |
Responsive + state variants (md:, hover:) | <style scoped> for anything Tailwind can do |
Violating the letter of the Tailwind-only rule is violating the spirit. Hooks may block scoped/inline styles; skills still teach the judgment call.
@apply soup@theme in app/assets/css/main.cssreferences/migration-v3-to-v4.md// nuxt.config.ts
import tailwindcss from '@tailwindcss/vite'
export default defineNuxtConfig({
vite: { plugins: [tailwindcss()] },
css: ['~/assets/css/main.css'],
})
/* app/assets/css/main.css */
@import "tailwindcss";
@theme {
--color-brand: #2563eb;
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}
<!-- good -->
<button class="rounded-xl bg-blue-600 px-6 py-3 text-white hover:bg-blue-700">
Submit
</button>
<!-- bad -->
<button style="padding: 12px">Submit</button>
<style scoped>
.btn { padding: 12px; }
</style>
bun add -d tailwindcss @tailwindcss/vite
# remove legacy: @nuxtjs/tailwindcss, tailwind.config.js (after migration)
| When | Read |
|---|---|
| Migrating from Tailwind 3 | references/migration-v3-to-v4.md |
| Excuse | Reality |
|---|---|
| "Just one scoped style" | Becomes many; use utilities or a component |
| "Need arbitrary values always" | Prefer theme tokens; arbitrary is escape hatch |
| "v3 config still works fine" | New apps and migrations use v4 CSS-first path |
@tailwindcss/vite, not Nuxt Tailwind module@theme when brand-specificnpx claudepluginhub pstuart/pstuart --plugin nuxt-modern-devTailwind CSS v4 patterns: CSS-first config, utility classes, component variants, v3 migration. Use when styling with Tailwind, configuring @theme tokens, using tailwind-variants/CVA, migrating v3 to v4, or fixing Tailwind styles and dark mode.
Covers Tailwind CSS v4 fundamentals: Vite/PostCSS installation, CSS-first @theme configuration, custom utilities, design systems, and 2025/2026 best practices.
Tailwind CSS v4 utility-first discipline: CSS-first configuration, design tokens via @theme, and principled class composition. Invoke whenever task involves any interaction with Tailwind CSS — writing, reviewing, refactoring, debugging, or understanding utility classes, theme configuration, custom utilities, dark mode, or Tailwind integration with frameworks.