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

TailwindCSS v4 notes / TODO1 #13088

Open
2 tasks
bep opened this issue Nov 25, 2024 · 5 comments
Open
2 tasks

TailwindCSS v4 notes / TODO1 #13088

bep opened this issue Nov 25, 2024 · 5 comments
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Nov 25, 2024

TailwindCSS v4 is now in beta: https://tailwindcss.com/docs/v4-beta

I have tested it and it works pretty great with the current version of Hugo.

Some notes and possible enhancements:

  • @config seems to resolve from the root, so @config "tailwind.config.js" works fine in the common cases, but we may want to make that configurable from the Hugo side.
  • I suspect the number one reason to have a config file is to set content sources (e.g. hugo_stats.json); these can also be set in the CSS with the @source; we may consider a way to control this from the Hugo side ...
@bep bep added this to the v0.140.0 milestone Nov 25, 2024
@bep bep self-assigned this Nov 25, 2024
@bep bep pinned this issue Nov 25, 2024
@bep bep modified the milestones: v0.140.0, Unscheduled Dec 11, 2024
@andrewconnell
Copy link

I thought one of the improvements in the beta release was removing the need for the configuration file, and instead doing everything in CSS?

REF: https://tailwindcss.com/docs/v4-beta#css-first-configuration

@bep
Copy link
Member Author

bep commented Dec 17, 2024

I thought one of the improvements in the beta release was removing the need for the configuration file, and instead doing everything in CSS?

Sure, but you can still have one (and you may still sometimes need one). The task list above is just things I need to test out/check. One part of this equation that TailwindCSS does not support very well without any config, but which is an important part of how Hugo is set up, is a project set up of different file trees living in random corners of your disk.

@bep bep modified the milestones: Unscheduled, v0.142.0 Jan 6, 2025
@bep bep unpinned this issue Jan 7, 2025
@bep bep modified the milestones: v0.142.0, v0.143.0, Unscheduled Jan 22, 2025
@chrede88
Copy link

Tailwindcss v4 is now GA. Looking forward to official Hugo support☺️

@bep bep modified the milestones: Unscheduled, v0.143.0 Jan 23, 2025
@bep
Copy link
Member Author

bep commented Jan 23, 2025

@chrede88 I have used all the Tailwind v4 alphas/betas and today the release version, and it works great with Hugo in the common setups. There are some known issues in more advanced setups that I will try to test and get into a Hugo release sometimes early next week.

See this project for a simple setup: https://github.com/bep/hugo-testing-tailwindcss-v4/tree/main/tailwindcss-cli-defer

@jloh
Copy link
Contributor

jloh commented Jan 24, 2025

Just another reference point, I have v4 setup in a branch for my site and switched to using the defer tailwindCLI setup in the above repo and it’s working perfectly 👍🏻

@bep bep changed the title TailwindCSS v4 beta notes / TODO1 TailwindCSS v4 notes / TODO1 Jan 24, 2025
@bep bep pinned this issue Jan 24, 2025
@bep bep unpinned this issue Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants