Adopt a Design System
Explore how adopting a design system helps manage and reduce CSS volume in Rails apps. Understand the importance of font sizes, spacing, and color palettes to create reusable components and maintain consistent styling. This lesson guides you to structure CSS effectively, improving sustainability and making your app easier to develop and maintain.
We'll cover the following...
Overview
Like helpers, the problem with CSS is how to manage the volume of code. CSS, by its nature, makes the problem worse because of the way CSS can interact with itself and the markup. It’s not unheard of for a single line of CSS to break an entire website’s visuals.
When CSS is unmanaged, developer productivity can go down, and the app becomes less sustainable. There are two main factors that lead to this that we must control:
Some CSS must be written for each new view or change to a view. The more required, the slower development will be.
The more CSS that exists, the harder ...