Option to create scaffolds with Tailwind styling
See original GitHub issueAs requested by @mojombo: if you have Tailwind configured, let’s create the scaffold/dbAuth templates with Tailwind classes instead of using all of the rw-
custom classes. This makes it more likely that you’ll want to take the time to customize them and keep them around.
Should include:
- Scaffolds
- Login/Signup/ResetPassword/ForgotPasswordPages from dbAuth
~This means we could skip creating the scaffold.css
file altogether. Any other generator that checks for the existence of this file needs to check for Tailwind config instead, and generate Tailwind-supported versions of themselves (currently just the dbAuth pages).~ As we further fleshed out the idea in the comments below, we’ll keep scaffold.css
and just update the styles from raw CSS rules like margin: 0 auto
to Tailwind’s @apply
directives, like mx-auto
. This gives us once place to go to make changes to all scaffolds, but those changes are still just Tailwind classes.
Could also include a flag to force Tailwind: yarn rw g scaffold User --tailwind
and one to not use Tailwind if it otherwise would: yarn rw g scaffold User --no-tailwind
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (7 by maintainers)
Thank you @cannikin for working on this, it is pretty much needed personally because I had to comment out the
scaffold.css
file and manually convert it to tailwind format inindex.css
+1 to the component classes technique, feels like a scalable way to handle there still being one template file but with different behaviors depending on what you use