NelsonLabs
CSS Styling/CSS Frameworks Overview

CSS Frameworks Overview

CSS frameworks are pre-built collections of CSS (and sometimes JavaScript) that give you ready-made components and utilities. They trade flexibility for speed. Understanding the tradeoffs helps you choose the right tool.

The two main approaches

TypeHow it worksExampleTradeoff
Component frameworkPre-built components with fixed stylesBootstrap, BulmaFast to start, harder to customise, design looks generic
Utility frameworkAtomic CSS classes you compose yourselfTailwind CSSHighly customisable, verbose HTML, consistent design tokens

Tailwind CSS โ€” the dominant choice today

Tailwind utility classes in action
html
<!-- Without Tailwind (you write CSS) -->
<div class="card">
  <h3 class="card-title">Hello</h3>
</div>

/* You write this CSS */
.card { background: #201D15; padding: 1.5rem; border-radius: 8px; }
.card-title { font-size: 1.25rem; font-weight: bold; }

<!-- With Tailwind (compose classes in HTML) -->
<div class="bg-warm-700 p-6 rounded-lg">
  <h3 class="text-xl font-bold">Hello</h3>
</div>
<!-- No CSS file needed โ€” Tailwind generates only what you use -->

TIP

Learn plain CSS first. Don't jump into Tailwind without understanding CSS fundamentals. Tailwind is CSS with a different syntax โ€” if you don't understand what flex, grid, padding, and border-radius do, the class names are meaningless. Build the foundation first, then the framework is easy.

When to use a framework

  • โ€”Prototype quickly โ€” frameworks are excellent for getting ideas on screen fast
  • โ€”Team consistency โ€” shared design tokens mean the team makes consistent choices
  • โ€”Large projects โ€” frameworks help avoid ad-hoc CSS accumulation
  • โ€”Learning โ€” writing raw CSS teaches you more than using a framework