-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add Tailwind option to Nextjs recipe #860
Comments
Discussed in #859Originally posted by welle-dev-duck January 29, 2025 I found a way of easily integrating TailwindCss with Puck, where in the editor we have full control over the styles, missing all the headaches cause by class purging.I think this could be added to the recipe.
create postcss.config.mjs in the root
in styles.css Overriding Puck iframe in app/puck/[…puckPath]/client.tsx
Optionally adding a new field to the base HeadingBlock defined in puck config
|
That should not matter since both the custom tailwind modifications and the whole library from the CDN is present in the editor. Tailwind V4 is backwards compatible so it can be configured 2 ways:
This way when somebody wants to see the generated pages, Tailwind (the downloaded package) will look trough the generated html, generate classes based on it, add every customization it finds in the config, and then ships it minified to the client. |
Add a Tailwind option to the Next.js recipe
Proposals
Proposal 1
Add a
--withTailwind
flag to the generatorProposal 2
Prompt the user during install for CSS library
Proposal 3
Don't add this option, but just wrap the Tailwind functionality as a plugin (similar to emotion plugin)
Considerations
The text was updated successfully, but these errors were encountered: