A Ten-Minute grep Review for AI-Generated CSS
Disclosure: I work on VibUI, a paid library of website prompts. It's linked once, at the very end. Say the pull request lands and it's 1,800 lines of CSS, all generated, all "looks great in the preview." You've got ten minutes before standup. You can't read it line by line, and you shouldn't have t

Disclosure: I work on VibUI, a paid library of website prompts. It's linked once, at the very end.
Say the pull request lands and it's 1,800 lines of CSS, all generated, all "looks great in the preview." You've got ten minutes before standup. You can't read it line by line, and you shouldn't have to. AI-written stylesheets fail in a handful of very repeatable ways, and almost every one of them can be found with a one-line search.
Here's the review I'd run. It uses ripgrep, but plain grep -rnE works for most of it.
Run them in that order. You'll usually find the worst offenders in the first three searches, and you'll know within two minutes whether the generated code respects your tokens or ignored them.
Don't fix them by hand yet. Group them and ask whether the prompt allowed them.
Styling rules: - Use only the CSS custom properties in tokens.css. No raw hex, rgb or hsl values. - Spacing from the --space-* scale only. No px margins, paddings or gaps. - No!important. No z-index above 50; use the layers defined in tokens.css. - Never remove focus outlines; style:focus-visible instead. - transition only on named properties, never "all". - One shared button class; do not redefine it per section. Enter fullscreen mode Exit fullscreen mode The same list works whether the code comes from v0, Lovable, Bolt, Cursor, Windsurf, Claude, ChatGPT, Gemini, Replit, GitHub Copilot, Framer AI, Google Stitch, Readdy, Aura.build or OpenAI Codex. Keep it in a snippets file and paste it at the top of every styling request.
If you do this more than twice, wrap it:
#!/usr/bin/env bash # css-smells.sh (run from the repo root) echo "z-index >= 100:"; rg -n "z-index:\s*[0-9]{3,}" -g "*.css" || true echo "!important:"; rg -c "!important" -g "*.css" || true echo "raw colours:"; rg -c "#[0-9a-fA-F]{3,8}\b" -g "*.css" || true echo "focus removed:"; rg -n "outline:\s*(none|0)" -g "*.css" || true echo "transition: all:"; rg -n "transition:\s*all" -g "*.css" || true Enter fullscreen mode Exit fullscreen mode Counts matter more than any single line. If the numbers go up between two generations of the same section, the prompt is getting looser, not tighter.
Fair warning, this part's a pitch. If you build pages often, starting from a section that already uses tokens and sane spacing means fewer hits in the first place. VibUI is the library I work on: 2,852 website prompt templates (775 pages, 1,100 sections, 817 components, 160 animated backgrounds), about 1,000 with source code. Pricing is a one-time payment, no renewal: $48 quarterly, $99 yearly, $179 lifetime (listed down from $384). Yearly and lifetime also include 2,407 AI video prompts. There are 60 free samples and a free account can copy 2 prompts. Run one through the greps above before you decide it's worth anything.