nasa-jpl/explorer-1

Downgrade `@tailwindcss/forms`

Closed this issue · 7 comments

Description

We somehow missed this warning when updating @tailwindcss/forms:

npm WARN @tailwindcss/forms@0.5.0 requires a peer of tailwindcss@>=3.0.0 || >= 3.0.0-alpha.1 but none is installed. You must install peer dependencies yourself.

We should determine if using version 0.5.0 negatively impacts our build. If so, then downgrade to the latest version that doesn't require TailwindCSS 3.

Hmm… but we don't see any negative effects?

Not that I could tell!

Do we really need to downgrade, then? Could be that the requirement only applies to parts of Tailwind Forms that we're not using?

Do we really need to downgrade, then? Could be that the requirement only applies to parts of Tailwind Forms that we're not using?

It's possible. We can check that when investigating the issue. I've updated the description to reflect that.

According to the release notes, we should be on version 0.3.4. Version 0.4 and later are noted as "incompatible" with Tailwind 2, but I still haven't determined exactly what's affected. https://github.com/tailwindlabs/tailwindcss-forms/releases

I looked into this a bit more, and the part that's affected is the default colors used for form inputs, which we we're overriding anyway. However, if a user creates form elements without the CSS classes as documented in our templates, they will see these default colors. Effectively, in the CSS, the latest version of @tailwindcss/forms changes the border color of form elements from #6b7280 to #71717a, which is pretty indistinguishable to me.

So, in short, I think it's okay to leave as-is.

Awesome, thanks for checking into it!