Skip to content

Add Tailwind CSS v4 + Vite installation instructions#642

Merged
aaronpowell merged 2 commits into
github:mainfrom
garrettsiegel:add-tailwind-v4-vite-instructions
Feb 3, 2026
Merged

Add Tailwind CSS v4 + Vite installation instructions#642
aaronpowell merged 2 commits into
github:mainfrom
garrettsiegel:add-tailwind-v4-vite-instructions

Conversation

@garrettsiegel

Copy link
Copy Markdown
Contributor

Adds comprehensive instructions for installing and configuring Tailwind CSS v4+ with Vite projects.

What this covers

  • Step-by-step installation using @tailwindcss/vite plugin
  • Key v4 changes (no PostCSS, no tailwind.config.js)
  • CSS-first configuration with @theme, @utility, and @variant
  • Common mistakes to avoid (old directives, unnecessary config files)
  • Migration guide from Tailwind v3
  • Troubleshooting section

Why 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.md is Next.js-specific.

Copilot AI review requested due to automatic review settings February 2, 2026 17:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
applyTo: 'vite.config.ts, vite.config.js, **/*.css, **/*.tsx, **/*.ts, **/*.jsx, **/*.js'
applyTo: 'vite.config.ts, vite.config.js, src/**/*.css'

Copilot uses AI. Check for mistakes.
Comment thread .vscode/settings.json Outdated
Comment on lines +27 to +28
},
"hide-files.files": []

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
},
"hide-files.files": []
}

Copilot uses AI. Check for mistakes.
Comment thread .vscode/settings.json Outdated
@aaronpowell
aaronpowell merged commit 3e2ad67 into github:main Feb 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants