Spina uses Tailwind 3 as its CSS framework to build all views. It uses the tailwindcss-rails gem which includes a CLI for generating Tailwind's CSS.
Spina hooks into your main app's assets:precompile
task and adds the following steps:
Spina.config.tailwind_content
app/assets/config/spina/tailwind.config.js
app/assets/builds/spina/tailwind.css
Spina plugins can add paths to the Spina.config.tailwind_content
array which is then added to the Tailwind configuration file. This setup ensures that your Tailwind build always includes all classes needed when precompiling assets in production.
If you're developing a Spina plugin, you can use the rails spina:tailwind:build
and rails spina:tailwind:watch
tasks to generate new builds locally.