Philosophy

Philosophy

Efficient by design. Transparent with the numbers.

forma-css was born after a decade of building with Bootstrap and a question asked again and again: why? 

Why ship around 230 kB of CSS to render a page of text? 

Why load a JavaScript library so a menu can open? 

Why generate twelve column classes for five breakpoints when a grid can be declared once?

 

The search for an answer led to Pico CSS: semantic HTML, almost no classes, a light page. Pico's philosophy was right, but its ~80 kB were still more weight than these projects were willing to carry. So the answer became a framework: keep styling semantic HTML, add classes only where HTML is not enough — and carry it further with modern CSS. That is forma-css.

This page explains the reasoning. The reference documentation starts at the Getting started page.

The footprint, in four numbers

< 10 kb gzipped

The complete framework, compressed. Smaller than most hero images.

A+ Digital Carbon Rating

The top grade at Ecograder — measured on this very site.

 

< 0.02 g CO₂

Carbon emitted per visit to this site. Eco-friendly without a boring page in sight.

100% renewable hosting 

Served from self-hosted nginx on renewable energy. Your traffic, your footprint.

The numbers, transparent

Two numbers define forma-css: under 50 kB of CSS, complete and uncompressed, and under 10 kB once gzipped. Not minified-only, not after tree-shaking modules you never use: that is what the whole framework weighs. The comparison, in the open:

 UncompressedCompressed (gzip)
forma-css< 50 kB< 10 kB
Pico CSS~80 kB~20 kB
Bootstrap~230 kB~30 kB
Tailwind (JIT, per project) *~10–30 kB~5–10 kB

*Tailwind is the one framework in this table that does not ship a fixed file: it compiles a custom stylesheet per project from the classes in your markup, so its size varies (a badly configured or CDN build is a different animal: ~3.8 MB uncompressed, ~650 kB gzipped). The transparent point in its favour: a well-configured JIT build is also small. The difference is what it takes to get there — a build pipeline with content paths and purging versus one CSS file that is always under 50 kB, uncompressed and complete.

And in practice, there is a condition behind that asterisk: Tailwind requires JavaScript tooling. Either you run a Node build pipeline with content paths and purging — on top of the framework runtime, the bundler and the megabytes of libraries that the CSS budget never counts — or you load the Play CDN, a script that compiles the CSS in every visitor's browser. forma-css requires none of it: import one file, and the optional SCSS compile is only there if you want to customize at build time. It was designed for pages where there is nothing else to count: HTML, under 50 kB of CSS, and a payload that is almost the page itself.

Both columns are shown on purpose. Compression narrows the gap, and pretending otherwise would not be transparent. The real difference is elsewhere: forma-css is a complete framework in under 10 kB, so the CSS you download is almost entirely CSS your page uses — no pre-generated column grids, no components you never render, no variants you snap off with a build step because they were too heavy to ship.

The proof is this site: the documentation you are reading holds an A+ Digital Carbon Rating at Ecograder, at under 0.02 g CO₂ per visit, with the documentation pages shipping under 10 kB of CSS and about 2 kB of JavaScript. Numbers move as a site grows; the commitment does not.

Zero JavaScript is a feature

forma-css ships no JavaScript. Not "a little" — none. Interactive components — accordion, dropdown, burger menu, modal, toast, tooltip, tab navigation — are native HTML: details, the Popover API, dialog, radio-based tabs. The behaviour comes from the browser; the framework only styles it.

Where older frameworks needed a script, forma-css uses modern CSS: light-dark() themes the site automatically without a theme switcher, @layer keeps the cascade predictable — framework rules live in the lower layers (forma.reset, base, components, utilities), so your CSS wins by construction and the whole codebase ships without a single !important, the nuclear option Bootstrap taught us to reach for, @starting-style and ::details-content animate entering elements, oklch derives every hover, active and inverse state from two colour variables. JavaScript stopped being necessary, so it is not there.

The gain is not only weight. Native behaviour keeps native accessibility for free: keyboard, focus, Esc to dismiss, light dismiss outside. The components never fight the browser, because the browser is the component. Browse them in the components reference.

The signature pattern: classes + custom properties

The pattern that defines forma-css: class names for structure, custom properties for variation — set inline, so every new value resolves to zero new CSS.

A Bootstrap-style grid must ship .col- classes for every span on every breakpoint before you write a single line. forma-css ships one grid rule; the values live in your markup: --span, --grid-columns and their per-breakpoint cascade. Decimal values like 2.5 are valid, which no class-based grid can express. One rule, unlimited layouts — and the stylesheet never grows, no matter how many different pages you build.

The framework defines a single grid rule; every column width here is an inline custom property. A class-based grid would need each of these widths pre-compiled and downloaded — here 3.5 or 8.5 cost nothing.

Sidebar
Main content — a decimal span no class-based grid can express.
HTML
<div class="responsive-container">
  <div class="responsive-column" style="--span: 12; --span-md: 3.5">Sidebar</div>
  <div class="responsive-column" style="--span-md: 8.5">Main content — a decimal span no class-based grid can express.</div>
</div>
Efficient is not boring.

Efficient is not boring.

Ecological web design has an image problem: plain pages, no motion. The page you are reading is the counter-argument — parallax, animated counters and scroll reveals, with zero JavaScript libraries. Eco-friendly means every byte is doing work.

Browse the components

What forma-css is not

forma-css is not dogmatic. It styles semantic HTML first, but where HTML is not enough it provides small utilities: the universal sizes .sm, .lg, .xl, the colours .color-*, the grids .grid and .responsive-container. Class-light, not classless.

It is not a cure for every project either. Applications with frantic server-side data exchange may genuinely need more tooling — use it there. But for the great majority of websites, the transparent answer to "how much framework does this page need?" is: this much. If you come from Pico CSS, Bootstrap or Tailwind, the migration guides show exactly what changes.