<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PavloK</title>
    <description>The latest articles on DEV Community by PavloK (@__aa5b04f75e3a).</description>
    <link>https://dev.to/__aa5b04f75e3a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3350252%2Fa8bca1e8-9cfd-48d6-8ba6-fb0ffd69993f.jpg</url>
      <title>DEV Community: PavloK</title>
      <link>https://dev.to/__aa5b04f75e3a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/__aa5b04f75e3a"/>
    <language>en</language>
    <item>
      <title>I built a CLI that catches design inconsistencies — like Lighthouse, but for your design system</title>
      <dc:creator>PavloK</dc:creator>
      <pubDate>Tue, 03 Mar 2026 18:31:42 +0000</pubDate>
      <link>https://dev.to/__aa5b04f75e3a/i-built-a-cli-that-catches-design-inconsistencies-like-lighthouse-but-for-your-design-system-nc7</link>
      <guid>https://dev.to/__aa5b04f75e3a/i-built-a-cli-that-catches-design-inconsistencies-like-lighthouse-but-for-your-design-system-nc7</guid>
      <description>&lt;p&gt;&lt;em&gt;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?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I built &lt;code&gt;design-auditor&lt;/code&gt; for exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;This is design drift. And it’s invisible until it isn’t.&lt;/p&gt;




&lt;h2&gt;
  
  
  What design-auditor does
&lt;/h2&gt;

&lt;p&gt;It opens your URL in a real browser (via Playwright), reads every element’s &lt;strong&gt;computed styles&lt;/strong&gt;, and runs them through a set of design system rules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx design-auditor https://yoursite.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No config. No installation. One command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5x3iif88ey4g9rpyykff.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5x3iif88ey4g9rpyykff.gif" alt="design-auditor usage preview" width="720" height="475"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What it checks
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔤 Typography
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;How many font families are actually in use (recommended: ≤ 3)&lt;/li&gt;
&lt;li&gt;Whether font sizes follow a modular scale&lt;/li&gt;
&lt;li&gt;Line-height consistency — does your site have a baseline grid, or chaos?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎨 Colors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Total unique colors across the page&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Perceptual color clustering&lt;/strong&gt; using delta-E (CIE76) — catches &lt;code&gt;#f0f6fc&lt;/code&gt; and &lt;code&gt;#f6f8fa&lt;/code&gt; as “basically the same color”&lt;/li&gt;
&lt;li&gt;WCAG AA contrast validation for every text/background pair&lt;/li&gt;
&lt;li&gt;Whether colors are tokenized in CSS variables or hardcoded everywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📐 Spacing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Detects your rhythm unit (&lt;code&gt;font-size × line-height&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Checks if spacing follows a 4px or 8px grid&lt;/li&gt;
&lt;li&gt;Flags outliers like &lt;code&gt;13px&lt;/code&gt;, &lt;code&gt;17px&lt;/code&gt;, &lt;code&gt;22px&lt;/code&gt; — the “magic numbers” that creep in&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧩 Components
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Touch target sizes (WCAG 2.5.5 minimum: 44×44px)&lt;/li&gt;
&lt;li&gt;Button padding variations — are you using sm/md/lg or 11 random sizes?&lt;/li&gt;
&lt;li&gt;Border-radius consistency&lt;/li&gt;
&lt;li&gt;Z-index organization&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Real output example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;────────────────────────────────────────────────────────────
  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 &amp;lt; 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 ✅
────────────────────────────────────────────────────────────
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every color renders as a &lt;strong&gt;live color swatch&lt;/strong&gt; right in your terminal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why a real browser matters
&lt;/h2&gt;

&lt;p&gt;Most CSS audit tools parse your source files. &lt;code&gt;design-auditor&lt;/code&gt; uses Playwright to open the actual page and runs &lt;code&gt;getComputedStyle()&lt;/code&gt; on every element.&lt;/p&gt;

&lt;p&gt;That means it catches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Styles injected by JavaScript at runtime&lt;/li&gt;
&lt;li&gt;CSS custom properties resolved to their actual values&lt;/li&gt;
&lt;li&gt;Styles from third-party scripts and embeds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It sees what your user sees — not what your source code says.&lt;/p&gt;




&lt;h2&gt;
  
  
  Save reports for CI or tracking design drift
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx design-auditor https://yoursite.com &lt;span class="nt"&gt;--save-report&lt;/span&gt;
&lt;span class="c"&gt;# → design-audit-yoursite-com-2026-02-28.json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The JSON output is structured for dashboards, CI pipelines, or just tracking how your design consistency changes over time across deploys.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who this is for
&lt;/h2&gt;

&lt;p&gt;This tool is most useful if you’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;freelancer or agency&lt;/strong&gt; doing QA before handing off a site to a client&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;frontend dev&lt;/strong&gt; on a team where design system adoption is inconsistent&lt;/li&gt;
&lt;li&gt;Anyone who’s inherited a codebase and wants to understand the “shape” of its CSS before touching it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s especially powerful for &lt;strong&gt;landing pages and marketing sites&lt;/strong&gt; — the places where design consistency matters most visually, but automated tooling is usually absent.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# No install needed&lt;/span&gt;
npx design-auditor https://yoursite.com

&lt;span class="c"&gt;# Specific modules only&lt;/span&gt;
npx design-auditor https://yoursite.com &lt;span class="nt"&gt;--only&lt;/span&gt; colors,typography

&lt;span class="c"&gt;# Local dev server&lt;/span&gt;
npx design-auditor http://localhost:3000 &lt;span class="nt"&gt;--local&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Requires Node.js 18+&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/PashaSchool/design-auditor" rel="noopener noreferrer"&gt;https://github.com/PashaSchool/design-auditor&lt;/a&gt;&lt;br&gt;
Website: &lt;a href="https://pashaschool.github.io/design-auditor/" rel="noopener noreferrer"&gt;https://pashaschool.github.io/design-auditor/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;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?&lt;/p&gt;

</description>
      <category>cli</category>
      <category>css</category>
      <category>design</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
