Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route...
by tipiirai on Monday March 06, 2023 @01:32AM
(#35038112)
1. Check: Good defaults for colors and spacing.
2. Components are indeed re-usable, but not Tailwind-based styling. You cannot make reusable components and apply different styling to those components depending on the context where they are. CSS gives you both re-usable components and re-usable styling since they are separated and can be used independenty (given they are written in re-usable fashion)
I would take their defaults
1. It gives you bunch of sane defaults around colours and spacing. If you consistently use Tailwinds classes then you'll get a nice grid and (usually) complimentary colours.
2. You're using a a framework or view library that supports reusable components. For React, this is obvious. For Phoenix, you use LiveView components or the Phoenix "static" components.
Tailwind only really works when you apply its classes to components, then reuse the components (or more tersely: "Reusable styles via reusable components")