Skip to content

V4: Update README.md #1267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

V4: Update README.md #1267

wants to merge 2 commits into from

Conversation

junepil
Copy link
Contributor

@junepil junepil commented Mar 16, 2025

With the update to Tailwind CSS v4, JavaScript config files are still supported for backward compatibility but are now redundant. Because of this, I believe the README.md should be updated to avoid confusion, especially when debugging issues like IntelliSense not working.

Additionally, the following link currently points to the theme documentation, which seems incorrect. It should either be updated to the v3 configuration guide if relevant or removed altogether.

Thanks for the great project! 🤟

@nyatinte
Copy link

Hi @junepil,

Thanks a lot for this pull request! Updating the README to better reflect Tailwind CSS v4's configuration is really valuable and helps prevent confusion for users.

Actually, I've also experienced some issues related to v4 configuration detection myself, and looking at this PR helped me understand the situation better.

I agree that the previous wording focusing solely on the tailwind.config.{...} file as a strict requirement might be misleading for v4 projects, especially those using the CSS-first approach. Removing that outdated emphasis is a great step.

Although I'm not a formal reviewer, from a user's perspective, I believe adding some further explanation in the README would be beneficial, particularly regarding Tailwind CSS v4 configuration detection.

Based on the code (e.g., in analyze.ts), the extension appears to detect configuration not only from the traditional JavaScript config file but also from CSS files containing v4 directives like @import and @theme.

To clarify this for users, especially those starting with v4's CSS-first approach, I suggest updating the activation criteria description to cover both methods. Perhaps something like this:

"In order for the extension to activate, you must have `tailwindcss` installed in your workspace. The extension will then attempt to detect your Tailwind CSS configuration, which can be located in one of the following:

* A JavaScript config file (`tailwind.config.{js,cjs,mjs,ts,cts,mts}`), typically used in **v3 and earlier**.
* Or, for Tailwind CSS **v4** projects, configuration defined directly within your main CSS file using directives like `@import "tailwindcss";` and `@theme { ... }`.

This explicitly acknowledges the v4 CSS-first method and could help users understand how the extension identifies the configuration source.

What are your thoughts on incorporating this kind of detail into the README?

@junepil
Copy link
Contributor Author

junepil commented May 13, 2025

Thank's for the suggestion @nyatinte , I also believe that your version is definitely more user friendly and leads to correct understanding of the process using this extension.

@thecrypticace
Copy link
Contributor

thecrypticace commented May 13, 2025

o/ For some reason I can't push to this PR even tho it says I should be able to. I've copied the branch over to a new PR and started making changes there so you're still credited. Thanks!

See #1364

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