-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: tailwind v4 #10773
feat: tailwind v4 #10773
Conversation
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Do we want to keep line 99? |
Co-authored-by: Sarah Rainsberger <[email protected]>
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.
I think this looks great! Others still welcome to suggest improvements, but this is fine by me!
sidebar: | ||
label: Tailwind |
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.
LGTM, less work for translators. 😄
Two suggestions:
- I think we can also remove the sidebar label since it's no longer in the sidebar.
sidebar: | |
label: Tailwind |
- Maybe we should also update the link
Astro’s Tailwind integration
in Prerequisites in/en/recipes/tailwind-rendered-markdown/
to use the one from Tailwind instead?
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.
- I matched what was done for Lit, so maybe we can clean it up as well
- You're right, we probably need to scan for any link to the tailwind integration
I'm also wondering if on the integration page, we should link to the styles page so everyone goes through the same flow
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.
- Oh just nitpicking, I don't think it does anything anymore but it's not harmful. So yeah we could do that for Lit too.
- Great call! There also some examples that use
@astrojs/tailwind
and some anchors should be renamed I think.
I checked in VSCode, the following pages uses either a link to the integration page, Tailwind integration
as anchor or @astrojs/tailwind
in a code snippet:
/en/upgrade-astro.mdx
/en/guides/fonts.mdx
/en/guides/integrations-guide/index.mdx
/en/guides/migrate-to-astro/from-create-react-app.mdx
/en/guides/migrate-to-astro/from-gatsby.mdx
/en/guides/migrate-to-astro/from-nextjs.mdx
/en/reference/configuration-reference.mdx
(this one should be updated in core)
There also two upgrade guides that use @astrojs/tailwind
... (v2
and v3
) but not sure if we should update them...
Regarding the link, yeah it could be better if npx astro add tailwind
takes care of all the steps for the user (only adding @import 'tailwindcss';
is manual, right?). I don't have a strong opinion here...
Just quickly in general, we should probably still have some of the "usage" content on the Styling page now! It's a little extreme to just essentially mic drop TAILWIND then run away 😅 People still want to know about using Tailwind. Do they need a config file? If so, what goes in there? Do they need to import anything into files, or just write their class names? Are there caveats or pitfalls when combining Tailwind with other CSS? Can you also import and use CSS regularly? So, my suggestion is to take some of the meaningful/helpful usage content from the Tailwind page and put it in this Tailwind section! Thoughts welcome on exactly which content that is! |
I think it's important to mention at least the following:
|
@florian-lefebvre Can you add those items back then? I can always polish it up, but it's helpful if you add the content first! |
* The [Astro Ink](https://github.com/one-aalam/astro-ink), [Sarissa Blog](https://github.com/iozcelik/SarissaBlogAstroStarter), [Astro Tech Blog](https://github.com/nicdun/astro-tech-blog) and [Creek](https://github.com/robertguss/Astro-Theme-Creek) themes use Tailwind for styling | ||
* [Browse Astro Tailwind projects on GitHub](https://github.com/search?q=%22%40astrojs%2Ftailwind%22%3A+path%3A%2Fpackage.json\&type=code) for more examples! | ||
|
||
## Troubleshooting |
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.
@florian-lefebvre Just checking, do any of these troubleshooting things about @apply
still apply in v4?
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.
I think this is still relevant, although the tailwind config example isn't correct anymore: https://tailwindcss.com/docs/adding-custom-styles#adding-component-classes
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.
Looks great! Some small suggestions, and just wanted to check on some of the stuff being removed and not coming back (but if we remove too much, people will let us know and we can always add more later!) 🙌
Co-authored-by: Sarah Rainsberger <[email protected]>
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.
A few nits, after those LGTM!
src/content/docs/en/guides/migrate-to-astro/from-create-react-app.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Yan <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
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.
Amazing! Thank you so much for this @florian-lefebvre and catching all the stuff in the other files. Nicely done!
Description (required)
Related PR: withastro/astro#13049
Related issues & labels (optional)