Tools
Tools: I built a CLI that catches design inconsistencies β like Lighthouse, but for your design system
2026-03-03
0 views
admin
The problem ## What design-auditor does ## What it checks ## π€ Typography ## π¨ Colors ## π Spacing ## π§© Components ## Real output example ## Why a real browser matters ## Save reports for CI or tracking design drift ## Who this is for ## Try it You run Lighthouse to catch performance issues. You run axe to catch accessibility issues. But what catches the moment your site ends up with 54 shades of blue and 22 different line-heights? I built design-auditor for exactly that. Youβre three sprints in. The designer is happy. The client is happy. Then someone opens the site on a large monitor and notices the buttons have four different border-radiuses. The headings are using six font sizes that donβt follow any scale. There are at least five βgraysβ that are almost β but not quite β the same. None of this breaks anything. Linters donβt catch it. Lighthouse doesnβt catch it. PR reviewers miss it because it lives in computed styles, not source code. This is design drift. And itβs invisible until it isnβt. It opens your URL in a real browser (via Playwright), reads every elementβs computed styles, and runs them through a set of design system rules. No config. No installation. One command. Every color renders as a live color swatch right in your terminal. Most CSS audit tools parse your source files. design-auditor uses Playwright to open the actual page and runs getComputedStyle() on every element. That means it catches: It sees what your user sees β not what your source code says. The JSON output is structured for dashboards, CI pipelines, or just tracking how your design consistency changes over time across deploys. This tool is most useful if youβre: Itβs especially powerful for landing pages and marketing sites β the places where design consistency matters most visually, but automated tooling is usually absent. GitHub: https://github.com/PashaSchool/design-auditor
Website: https://pashaschool.github.io/design-auditor/ Iβm actively developing this β feedback on what checks would be most useful to you is very welcome. What design inconsistencies do you find hardest to catch in code review? Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse CODE_BLOCK:
npx design-auditor https://yoursite.com Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
npx design-auditor https://yoursite.com CODE_BLOCK:
npx design-auditor https://yoursite.com CODE_BLOCK:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ TYPOGRAPHY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
Font families: 2 β OK β οΈ Font sizes: 11 unique β recommended β€ 8 β Line-heights: 22 unique β no vertical rhythm detected COLORS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β 54 unique colors found β recommended < 20 β 40 similar color pairs β palette can be consolidated ββ #f0f6fc β ββ #f6f8fa (ΞE=2.6) ββ #24292f β ββ #1f2328 (ΞE=2.9) COMPONENTS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β 28/50 buttons smaller than 44px touch target (56%) β οΈ Buttons: 11 padding variations β recommended β€ 3 β
Interactive states: :hover and :focus present ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ SUMMARY: 6 β 5 β οΈ 7 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Enter fullscreen mode Exit fullscreen mode CODE_BLOCK:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ TYPOGRAPHY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
Font families: 2 β OK β οΈ Font sizes: 11 unique β recommended β€ 8 β Line-heights: 22 unique β no vertical rhythm detected COLORS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β 54 unique colors found β recommended < 20 β 40 similar color pairs β palette can be consolidated ββ #f0f6fc β ββ #f6f8fa (ΞE=2.6) ββ #24292f β ββ #1f2328 (ΞE=2.9) COMPONENTS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β 28/50 buttons smaller than 44px touch target (56%) β οΈ Buttons: 11 padding variations β recommended β€ 3 β
Interactive states: :hover and :focus present ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ SUMMARY: 6 β 5 β οΈ 7 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ CODE_BLOCK:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ TYPOGRAPHY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
Font families: 2 β OK β οΈ Font sizes: 11 unique β recommended β€ 8 β Line-heights: 22 unique β no vertical rhythm detected COLORS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β 54 unique colors found β recommended < 20 β 40 similar color pairs β palette can be consolidated ββ #f0f6fc β ββ #f6f8fa (ΞE=2.6) ββ #24292f β ββ #1f2328 (ΞE=2.9) COMPONENTS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β 28/50 buttons smaller than 44px touch target (56%) β οΈ Buttons: 11 padding variations β recommended β€ 3 β
Interactive states: :hover and :focus present ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ SUMMARY: 6 β 5 β οΈ 7 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ COMMAND_BLOCK:
npx design-auditor https://yoursite.com --save-report
# β design-audit-yoursite-com-2026-02-28.json Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK:
npx design-auditor https://yoursite.com --save-report
# β design-audit-yoursite-com-2026-02-28.json COMMAND_BLOCK:
npx design-auditor https://yoursite.com --save-report
# β design-audit-yoursite-com-2026-02-28.json COMMAND_BLOCK:
# No install needed
npx design-auditor https://yoursite.com # Specific modules only
npx design-auditor https://yoursite.com --only colors,typography # Local dev server
npx design-auditor http://localhost:3000 --local Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK:
# No install needed
npx design-auditor https://yoursite.com # Specific modules only
npx design-auditor https://yoursite.com --only colors,typography # Local dev server
npx design-auditor http://localhost:3000 --local COMMAND_BLOCK:
# No install needed
npx design-auditor https://yoursite.com # Specific modules only
npx design-auditor https://yoursite.com --only colors,typography # Local dev server
npx design-auditor http://localhost:3000 --local - How many font families are actually in use (recommended: β€ 3)
- Whether font sizes follow a modular scale
- Line-height consistency β does your site have a baseline grid, or chaos? - Total unique colors across the page
- Perceptual color clustering using delta-E (CIE76) β catches #f0f6fc and #f6f8fa as βbasically the same colorβ
- WCAG AA contrast validation for every text/background pair
- Whether colors are tokenized in CSS variables or hardcoded everywhere - Detects your rhythm unit (font-size Γ line-height)
- Checks if spacing follows a 4px or 8px grid
- Flags outliers like 13px, 17px, 22px β the βmagic numbersβ that creep in - Touch target sizes (WCAG 2.5.5 minimum: 44Γ44px)
- Button padding variations β are you using sm/md/lg or 11 random sizes?
- Border-radius consistency
- Z-index organization - Styles injected by JavaScript at runtime
- CSS custom properties resolved to their actual values
- Styles from third-party scripts and embeds - A freelancer or agency doing QA before handing off a site to a client
- A frontend dev on a team where design system adoption is inconsistent
- Anyone whoβs inherited a codebase and wants to understand the βshapeβ of its CSS before touching it
how-totutorialguidedev.toaiserverjavascriptgitgithub