Add Tailwind CSS v4 + Vite installation instructions#642
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive installation and configuration instructions for Tailwind CSS v4+ with Vite projects, addressing the fundamental changes in v4's setup approach compared to v3.
Changes:
- New instruction file for Tailwind CSS v4 + Vite setup with CSS-first configuration
- Updated README to include the new Tailwind v4 + Vite instructions
- Enhanced VS Code settings with file exclusion patterns
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| instructions/tailwind-v4-vite.instructions.md | Comprehensive guide for Tailwind v4 installation covering setup steps, CSS-first configuration, migration from v3, and troubleshooting |
| docs/README.instructions.md | Added table entry with installation badges for the new Tailwind v4 + Vite instructions |
| .vscode/settings.json | Added file exclusion patterns for common system files |
| @@ -0,0 +1,243 @@ | |||
| --- | |||
| description: 'Tailwind CSS v4+ installation and configuration for Vite projects using the official @tailwindcss/vite plugin' | |||
| applyTo: 'vite.config.ts, vite.config.js, **/*.css, **/*.tsx, **/*.ts, **/*.jsx, **/*.js' | |||
There was a problem hiding this comment.
The applyTo glob pattern includes all TypeScript and JavaScript files in the project, which may be too broad for Tailwind-specific instructions. Consider limiting this to configuration files and CSS files only (e.g., 'vite.config.{ts,js}, src/**/*.css') to avoid applying these instructions to unrelated code.
| applyTo: 'vite.config.ts, vite.config.js, **/*.css, **/*.tsx, **/*.ts, **/*.jsx, **/*.js' | |
| applyTo: 'vite.config.ts, vite.config.js, src/**/*.css' |
| }, | ||
| "hide-files.files": [] |
There was a problem hiding this comment.
The addition of files.exclude settings and an empty hide-files.files array appears unrelated to Tailwind CSS v4 instructions. These VS Code workspace settings should either be removed from this PR or explained in the PR description as they don't support the stated purpose of adding Tailwind documentation.
| }, | |
| "hide-files.files": [] | |
| } |
Adds comprehensive instructions for installing and configuring Tailwind CSS v4+ with Vite projects.
What this covers
@tailwindcss/viteplugin@theme,@utility, and@variantWhy this is needed
Tailwind v4 has a fundamentally different setup than v3, and many developers (and AI assistants) still default to the old PostCSS-based approach. This fills a gap since the existing
nextjs-tailwind.instructions.mdis Next.js-specific.