Search⌘ K
AI Features

CSS and webpack

Explore how to effectively load and manage CSS in Rails applications using Webpack and Webpacker. Understand the installation and setup of Tailwind CSS, PostCSS, and Sass/SCSS processing. Gain the skills to organize custom CSS files and enhance styling workflows for modern front-end development.

We'll cover the following...

Building CSS in webpack

In this lesson, we’re going to focus on using CSS in webpack.

For more details on exactly what our tools do when we load them, see Webpacker in Development.

Initially, it was tricky to load CSS from Webpacker, but there have been continual improvements, and it’s now about as simple as using SprocketsSprockets is a Ruby library for compiling and serving web assets. .

Webpacker allows us to add support for CSS, and CSS processors like PostCSS, and CSS variant languages like Sass and SCSS. ...