-
Notifications
You must be signed in to change notification settings - Fork 991
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
Update Tailwind setup. Show extensions to install #8954
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tobbe
changed the title
Update Tailwind setup
Update Tailwind setup. Show extensions to install
Jul 23, 2023
jtoar
approved these changes
Jul 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it locally and works, those extension messages are nice. Thanks @Tobbe!
jtoar
pushed a commit
that referenced
this pull request
Jul 26, 2023
I recently setup a new RW project with Tailwind and noticed a few improvements I thought could be made First I wanted our setup to as closely as possible follow the latest instructions on https://tailwindcss.com/docs/installation/using-postcss Mainly that meant to use `@tailwind base;` etc instead of `@import ...` Unfortunately (?) I couldn't use their postcss config syntax, because they're using Next-specific syntax tailwindlabs/tailwindcss.com#870 TW PR that updated their docs vercel/next.js#10117 Next issue about the syntax with some good info in the comments, including motivation on why they use this non-standard syntax Secondly I got syntax warnings in my css files after setting up Tailwind. After some googling I fixed that by installing the VS Code Tailwind intellisense extension. Looking at our code I then realized we do add that extension to the list of recommended extensions in the user's project. But we never actually tell the user to install it. I should have looked at all the files the setup command modified, but even if I had, I probably wouldn't have realized that was one of the plugins that we recommend, because the plugin ID doesn't match the name of the plugin (the ID is `bradlc.vscode-tailwindcss`) This is the first warning I spotted (`Unknown at rule @tailwind css(unknownAtRules)`) ![image](https://github.com/redwoodjs/redwood/assets/30793/bfe13012-dc9d-437f-9f5a-6807c9a52337) This is what it looks like when running the setup command after my changes: ![image](https://github.com/redwoodjs/redwood/assets/30793/3eff2c9f-4375-4a7b-8466-379b8c9e8fc2) --- @jtoar * I selected the v6 milestone, but this totally doesn't have to go out in an RC. It can wait for v6.1 or whatever. It's non-breaking, but you decide when you want to release it. * For the upgrade guide we could suggest people switch to the declaration syntax instead of imports. But the imports still seem to work, so we could also just skip it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently setup a new RW project with Tailwind and noticed a few improvements I thought could be made
First I wanted our setup to as closely as possible follow the latest instructions on https://tailwindcss.com/docs/installation/using-postcss
Mainly that meant to use
@tailwind base;
etc instead of@import ...
Unfortunately (?) I couldn't use their postcss config syntax, because they're using Next-specific syntax
tailwindlabs/tailwindcss.com#870 TW PR that updated their docs
vercel/next.js#10117 Next issue about the syntax with some good info in the comments, including motivation on why they use this non-standard syntax
Secondly I got syntax warnings in my css files after setting up Tailwind. After some googling I fixed that by installing the VS Code Tailwind intellisense extension. Looking at our code I then realized we do add that extension to the list of recommended extensions in the user's project. But we never actually tell the user to install it. I should have looked at all the files the setup command modified, but even if I had, I probably wouldn't have realized that was one of the plugins that we recommend, because the plugin ID doesn't match the name of the plugin (the ID is
bradlc.vscode-tailwindcss
)This is the first warning I spotted (
Unknown at rule @tailwind css(unknownAtRules)
)This is what it looks like when running the setup command after my changes:
@jtoar