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

Add Tailwind CSS to the templates #9585

Merged
merged 6 commits into from
Jun 12, 2024
Merged

Conversation

brookslybrand
Copy link
Contributor

@brookslybrand brookslybrand commented Jun 7, 2024

  • Add tailwind
  • Test all the templates

Copy link

changeset-bot bot commented Jun 7, 2024

⚠️ No Changeset found

Latest commit: 00fbaf0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brookslybrand brookslybrand changed the title Add Tailwind CSS to the templates Draft: Add Tailwind CSS to the templates Jun 7, 2024
@brookslybrand brookslybrand marked this pull request as draft June 7, 2024 22:21
@brookslybrand brookslybrand changed the title Draft: Add Tailwind CSS to the templates Add Tailwind CSS to the templates Jun 7, 2024
@pcattori
Copy link
Contributor

pcattori commented Jun 7, 2024

Worth noting that Tailwind v4 is planning to release with a Vite plugin that should obsolete all/most of this setup. Might be worth waiting for that, but not sure when they plan to ship it

@silvenon
Copy link
Contributor

silvenon commented Jun 8, 2024

Also, by doing this we lose the benefit that npx tailwindcss init provides.

Setting up Tailwind will always take up to a few minutes, compared to months or years of building the project. How often are we starting new projects that those minutes became so unbearable?

Even though I love Tailwind, I feel like this would be a step backwards, and a maintenance burden for you.

@brookslybrand
Copy link
Contributor Author

Worth noting that Tailwind v4 is planning to release with a Vite plugin that should obsolete all/most of this setup. Might be worth waiting for that, but not sure when they plan to ship it

Haha yeah, I thought about that. If it's a matter of weeks I'm happy to wait, but I have no idea how long it'll be (or if anyone knows)

@brookslybrand
Copy link
Contributor Author

Also, by doing this we lose the benefit that npx tailwindcss init provides.

Setting up Tailwind will always take up to a few minutes, compared to months or years of building the project. How often are we starting new projects that those minutes became so unbearable?

Even though I love Tailwind, I feel like this would be a step backwards, and a maintenance burden for you.

I appreciate the thoughts. it's hard balance. The majority of times people run something like npx create-remix@latest is because they want to

  • try Remix for the first time
  • teach Remix
  • Experiment with something they'll throw away

It's a pretty small amount of the time people run a create-* CLI to actually start a project they'll be working on for months or years. So I kind of few it the opposite, how many minutes are added for projects that are going to last months or years to either delete tailwind or modify the way they want to (even using npx tailwindcss init).

I definitely get why it can be seen as a step backwards, since it somewhat degrades the "purity" of the Remix template. I'm not sure I understand why you think it'll be a maintenance burden? Especially once tailwind 4 with the Vite plugin comes out

@brookslybrand
Copy link
Contributor Author

The other piece I should mention is that we want to make the templates a little nicer and more styled, so either we'll have to use something like tailwind, or ship a bunch of custom css or css modules that the user will delete. So either way in an attempt to make the templates more inviting, we're going to be including some degree of "you have to delete this stuff". I'm not sure the best way to strike that balance

@silvenon
Copy link
Contributor

The other piece I should mention is that we want to make the templates a little nicer and more styled

Ok, I'm convinced. I would rather provide that than the way Vite starts. Forget what I said about maintainenance burden, I was mostly refering to the purity, as you recognized.

@kiliman
Copy link
Collaborator

kiliman commented Jun 10, 2024

Yes, when I create an example on StackBlitz or Codesandbox, it's always a hassle if you want to use something like flex without resorting to inline styles or external CSS. Having Tailwind as part of the default template would definitely help.

@brookslybrand
Copy link
Contributor Author

Ok, I'm convinced. I would rather provide that than the way Vite starts. Forget what I said about maintainenance burden, I was mostly refering to the purity, as you recognized.

Thanks for your thoughts! We're gonna be updating these templates a bit over the next week or two I imagine, so please reach out if you feel like anything is funky

Thanks @kiliman for the thoughts as well

@brookslybrand brookslybrand marked this pull request as ready for review June 12, 2024 14:33
@brookslybrand brookslybrand merged commit f22561b into main Jun 12, 2024
2 checks passed
@brookslybrand brookslybrand deleted the brooks/tailwind-in-the-templates branch June 12, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants