Add a CSS Framework
Published: Feb 16th, 2021
This is part of Joyful Rails, a list of recommendations to make developing your Rails app more productive and joyful.
In this article, we are talking about adding a CSS framework.
When it comes time to make things pretty, use a good CSS framework to make that easier.
CSS frameworks exist for the same reasons Rails does. They make a lot of the decisions for you and give you pre-built components that you can combine and customize to make your app.
You can install it as an NPM package, load it remotely, download and use the compiled CSS, or download and use the source Sass. (That last option is unsupported.)
US Web Design System
Because USWDS was built for Federal agencies, it has extremely high standards for accessibility. It is highly themeable but still tends towards a very formal, authoritative look.
It can be installed as an NPM package or as a source code download. There are several third party distributions but none suitable for a Rails application. I advise using the NPM package with Yarn.
Foundation is very nice.
The workaround appears to include:
- installing Coffeescript for the duration of the install process.
- commenting out