Hotwire Summer: Galaxy brain CSS tricks for Hotwire
Techniques that will make you say "wait..you did that with only CSS?!"
Of the three-legged stool that is HTML, JavaScript, and CSS…Rails developers neglect CSS the most. But CSS — especially with modern, utility class tools like Tailwind — works really well with the Hotwire philosophy.
I’ve collected a bunch of CSS related tips to share with you:
How to deal with empty states when using Turbo Streams
Custom Tailwind Variants using data attributes
ERB-powered dynamic stylesheets
A new helper that will blow your mind if you hate string interpolating in ERB
You’ll learn at least one thing from this article or you can have your money back.
👉 Read it here: Galaxy brain CSS tricks with Hotwire and Rails
📣 Want to share? Join the discussion on Twitter
Stay boring!
- Matt