phoenixframework / tailwind

An installer for tailwind
MIT License
467 stars 61 forks source link

Should @import be @tailwind? #57

Closed ghenry closed 1 year ago

ghenry commented 1 year ago

https://github.com/phoenixframework/tailwind/blob/a3cabf55eab61577c5c74d6c935b94287a1e328d/lib/tailwind.ex#L337

as per item 8 at: https://tailwindcss.com/docs/guides/phoenix

Thanks.

nskins commented 1 year ago

Hi @ghenry. It appears to me that both methods are equivalent. I tested on my Phoenix app and replaced the @import statements with the @tailwind versions from the Tailwind docs. Both are importing Tailwind as expected. So at least we know that both ways are functionally correct. Hope that's helpful.

As for the question of "should" (as in "should this library be updated to use the method given in the Tailwind docs?"), I'll defer to someone who has more knowledge in this area.

josevalim commented 1 year ago

They also use @import tailwind/base in other places, we prefer @import as that is a CSS command and we don't need to introduce new keywords necessarily.