November 17, 2018
Supports Rails v4.2 and up.
This article will explain the installation process of tailwindcss in the context of building a new Rails app. If you have an existing Rails app, all you have to do is install webpacker then you can follow through the steps outlined below.
# installs the webpacker gem rails new sample_app --webpack
# yarn yarn add tailwindcss # npm npm install tailwindcss --save-dev
You can get the default stylesheet here
and add to
# .postcssrc.yml tailwindcss: "path/to/tailwind.js"
# application.js import "path/to/application.css";
That’s all you need to do. Try adding tailwindcss utility classes and they should work as expected. This library has always been my goto library when developing a product. It has a pretty low learning curve and you don’t have to memorize component classes because it’s based on utilities.
Check them out. TailwindCSS.