Agile Web Development with Rails 7: [solved]

Title: AWDWR 7 (page 118)

You are styling the add to cart button inline in the actual HTML rather than the stylesheet as per previous versions of the book and goes against everything I’ve ever learned about Rails programming. Why is this? Is this a limitation of Tailwind?

Welcome to Rails 7!

I’ve been with Rails since Rails 1. It seems every major release of Rails there are major paradigm shifts. Best practices change. Rails drives a number of these changes, and keeps up with others.

How Rails interacts with both JS and CSS is the biggest change with 7.0, and Tailwind’s integration is a bit further ahead that Rails’ integration with other CSS frameworks in two important ways: there is no node.js dependency, and the scaffold templates generated are enhanced.

As a book author, tailwind has allowed me to replace pages of text with lines of css atttributes. And hotwire allowed me to remove an entire chapter. The end result: a book that focuses more on Rails and less on web technologies.

Rest assured, if tailwind is not for you you are welcome to use a different CSS framework. Or no framework at all.