Menu

Why UI Screenshots Make Cursor & Claude Hallucinate (And How I Built a 64KB Shadow-DOM Inspector to Fix It)
📰

Why UI Screenshots Make Cursor & Claude Hallucinate (And How I Built a 64KB Shadow-DOM Inspector to Fix It)

DEV Community: tailwindcss·Dominik Krol·1 day ago
#j20aXSmX
#devtotailwindcss#devto#dev#clean#prism
Reading 0:00
15s threshold

Whenever I see a clean bento card, navbar, or pricing layout on a site like Linear or Stripe and want to understand how it's built—or rebuild a similar pattern in my own app—two things always break the flow:

Browser DevTools dumps 150–200+ computed CSS lines full of inherited defaults instead of clean utility classes.

Screenshots make Cursor, Claude Code, and v0 guess wrong. Vision models eyeball padding: 22px as p-8 , miss -0.02em font tracking, invent random hex grays, and flatten nested flexbox grids.

So over the past weeks (I'm a 17-year-old indie dev in Sweden), I built PRISM CSS —a ~64KB, zero-dependency vanilla JS inspection engine that runs 100% locally inside an isolated Shadow DOM.

How It Works Under the Hood

1. 60fps requestAnimationFrame Overlay Inside an Isolated Shadow DOM

Injecting inspector styles directly into a live website usually mutates or breaks the host page's CSS.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.