Skip to content
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

Document upgrade path for --config CLI option #2041

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RobinMalfait
Copy link
Member

This PR updates the upgrade guide for when you are using the Tailwind CLI with the --config option.

This option doesn't exist anymore, and instead you should use the @config directive in your CSS.

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 1:25pm

Comment on lines +81 to +83
In v3, you could use the `--config` option to point to your configuration file.
In v4 there is no configuration file anymore. If you still require a
configuration file, make sure to include it in your CSS file and use the `@config` directive:
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about something like this? (probably still needs to be split across multiple lines tho)

Suggested change
In v3, you could use the `--config` option to point to your configuration file.
In v4 there is no configuration file anymore. If you still require a
configuration file, make sure to include it in your CSS file and use the `@config` directive:
In v3, you could use the `--config` option to point to your configuration file. Now that projects are configured via CSS this option is no longer available. For projects that require a configuration file for compatibility reasons, load the file by using the `@config` directive in your CSS:


```shell
npx @tailwindcss/cli -i input.css -o output.css
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you include the config file content as an example code block too?

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.

2 participants