Group
  • Performance

    Cut the CSS my pages never use

    Find dead styles, duplicate rules, and framework bloat, then strip your CSS down to what pages actually render.

    • Improve quality
    • Ship faster
    • Intermediate
    • General

Free Prompt

My CSS has grown over the life of the project. Old pages were deleted, components were rewritten, and I suspect a large share of my stylesheet does nothing. Audit and shrink my CSS: 1. Measure what I have: total CSS size (raw and gzipped), how many stylesheets load per page, and whether one global file serves every page or styles are scoped. 2. Find dead CSS: selectors that match nothing on any current page. Use coverage tooling if available (browser dev tools coverage tab works) and cross-check class names against my templates/components before deleting anything, since some classes are added by JavaScript at runtime. 3. Find duplication: the same declarations repeated across files, near-identical utility classes invented twice (three slightly different grays, five card styles), and resets or frameworks imported more than once. 4. If I'm shipping a full CSS framework or icon library but using a fraction of it, reduce to what I use (purge/tree-shake setup, or replace with the small set of styles I actually need). 5. Check load behavior: CSS in the head that blocks rendering but styles only below-the-fold or rarely visited pages. Split or defer where it makes sense. Don't delete a selector just because it's not in the HTML; verify it's not applied by JS or used on a page you didn't crawl. The deliverable is the trimmed CSS, the before/after size, and a list of anything you flagged but left alone because you couldn't confirm it was dead.

What This Does / How This Helps

This measures your CSS weight, finds dead selectors and duplication, trims unused framework bulk, and checks that your stylesheets aren't blocking render unnecessarily. CSS bloat is quiet. It never throws an error; it just makes every page heavier and every style change riskier, because nobody knows which rules still matter. On vibe-coded projects it's worse: each AI iteration adds new styles without removing the old ones, so a year-old project can ship ten versions of the same button. Trimming it speeds up load and makes the next redesign survivable.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts