The ultimate CSS inspection, analysis, and design system extraction tool.
A powerful Chrome extension that goes far beyond DevTools — hover, inspect, copy, analyze, audit, and export CSS like never before.
Chrome DevTools shows you CSS. CSS Sniffer understands it.
| Feature | DevTools | CSS Sniffer |
|---|---|---|
| Filter browser defaults, group by category | ❌ | ✅ |
| Pin up to 5 elements, diff side-by-side | ❌ | ✅ |
| Export as CSS, SCSS, Tailwind, React, Vue, Svelte | ❌ | ✅ |
| Design token extraction & inconsistency detection | ❌ | ✅ |
| Performance audit (unused CSS, expensive selectors) | ❌ | ✅ |
| Cross-element pattern detection | ❌ | ✅ |
| Cascade & specificity visualization | ❌ | ✅ |
Space to pin, Shift to pause, Esc to exit:root { --color-primary: ... })module.exports = { theme: { extend: ... } })transition: all and animating layout-triggering properties[0,1,2] badges on every selector!important tracking — See exactly where !important overrides normal cascade@media breakpoints used on the pageflex-direction changes from row to column"color"<template> + <script setup> + <style scoped> single file component<style> blockClone this repository
git clone https://github.com/aymenhmaidiwastaken/Css-Sniffer.git
Open Chrome Extensions
chrome://extensions/Load the extension
css-sniffer folderStart inspecting
A manifest.firefox.json is included for Firefox compatibility. Rename it to manifest.json and load as a temporary extension via about:debugging.
The interface is organized into 4 groups with 15 total tabs:
| Group | Tabs | Purpose |
|---|---|---|
| Inspect | Styles, Box, Cascade, Anim | Element-level CSS analysis |
| Analysis | Colors, Type, Vars, Tokens, Patterns | Page-wide design system analysis |
| Perf | Audit, Responsive | Performance and responsive behavior |
| Track | Diff, Snapshots, History, A11y | Comparison, tracking, accessibility |
| Key | Action |
|---|---|
Hover |
Preview element CSS |
Click |
Select and lock element |
Space |
Pin element (up to 5) |
Arrow Keys |
Navigate DOM tree |
Shift |
Pause/resume scanning |
Esc |
Stop inspector |
css-sniffer/
├── manifest.json # Chrome Manifest V3
├── manifest.firefox.json # Firefox-compatible manifest
│
├── background/
│ └── service-worker.js # Message routing, tab state, lazy module injection
│
├── content/
│ ├── content.js # Message handler orchestrator
│ ├── content.css # Overlay and highlight styles
│ ├── utils/
│ │ ├── dom-helpers.js # Selector generation, element info
│ │ ├── css-filters.js # Default filtering, categorization, shorthands
│ │ └── keyboard.js # DOM navigation keyboard handler
│ └── modules/
│ ├── inspector.js # Hover/click/lock detection
│ ├── overlay.js # Visual highlights, floating CSS card
│ ├── css-extractor.js # Computed style extraction + box model
│ ├── pin-manager.js # Multi-element pinning with badges
│ ├── css-editor.js # Live CSS editing with undo/redo
│ ├── color-palette.js # Page color extraction + hue grouping
│ ├── typography.js # Font/size/weight analysis
│ ├── variables.js # CSS custom property detection
│ ├── contrast.js # WCAG contrast ratio checker
│ ├── diff.js # Side-by-side CSS comparison
│ ├── style-history.js # Edit changelog tracking
│ ├── design-tokens.js # Full design system extraction (lazy)
│ ├── perf-analyzer.js # CSS performance audit (lazy)
│ ├── pattern-detector.js # Cross-element pattern finding (lazy)
│ ├── responsive-inspector.js # @media breakpoint analysis (lazy)
│ ├── animation-inspector.js # Transition/animation detection (lazy)
│ ├── cascade-visualizer.js # Specificity & cascade (lazy)
│ └── snapshot-manager.js # Visual regression snapshots (lazy)
│
├── sidepanel/
│ ├── sidepanel.html # Main UI with 15 tab panes
│ ├── sidepanel.js # Message handling, rendering, exports
│ ├── sidepanel.css # Complete UI styling
│ ├── tab-manager.js # Two-tier grouped tab navigation
│ └── tabs/
│ ├── tab-tokens.js # Design token renderer
│ ├── tab-perf.js # Performance audit renderer
│ ├── tab-patterns.js # Pattern detection renderer
│ ├── tab-responsive.js # Responsive breakpoint renderer
│ ├── tab-animation.js # Animation inspector renderer
│ ├── tab-cascade.js # Cascade visualizer renderer
│ ├── tab-snapshots.js # Snapshot manager renderer
│ └── tab-history.js # Style history renderer
│
├── popup/
│ ├── popup.html # Quick launcher
│ ├── popup.js # Toggle inspector, open side panel
│ └── popup.css # Popup styling
│
├── lib/
│ ├── storage.js # Chrome storage wrapper
│ ├── theme.js # Dark/light mode management
│ ├── messaging.js # Message abstraction
│ ├── browser-polyfill.js # Firefox/Edge compatibility shim
│ ├── team-sync.js # Style guide save/load/check
│ └── exporters/
│ ├── css-exporter.js
│ ├── scss-exporter.js
│ ├── tailwind-exporter.js
│ ├── styled-exporter.js
│ ├── codepen-exporter.js
│ ├── react-exporter.js # React component generation
│ ├── vue-exporter.js # Vue SFC generation
│ ├── svelte-exporter.js # Svelte component generation
│ ├── figma-tokens-exporter.js # Figma Tokens JSON
│ ├── style-dictionary-exporter.js # Style Dictionary format
│ └── report-generator.js # HTML design report
│
├── styles/
│ └── variables.css # Global CSS variables (light + dark themes)
│
└── icons/
├── icon-16.png
├── icon-32.png
├── icon-48.png
└── icon-128.png
chrome.scripting.executeScript, not loaded on every page visit| Format | Use Case |
|---|---|
| CSS | Copy computed styles as a CSS rule |
| SCSS | Nested syntax with color variables |
| Tailwind CSS | Utility class string |
| styled-components | React styled.div template literal |
| React Component | Full functional component with styled-components |
| Vue SFC | <template> + <script setup> + <style scoped> |
| Svelte Component | Svelte file with scoped styles |
| CodePen | Opens a new CodePen pen with the element's HTML + CSS |
| CSS Variables | Design tokens as :root custom properties |
| Tailwind Config | tailwind.config.js with extracted theme |
| Figma Tokens JSON | Compatible with Figma Tokens plugin |
| Style Dictionary | Amazon Style Dictionary format |
| HTML Report | Self-contained shareable design system report |
| CSS Patch | Diff of all live-edit changes |
| Browser | Status |
|---|---|
| Chrome 109+ | Full support (Manifest V3 + Side Panel API) |
| Edge 109+ | Full support (Chromium-based) |
| Firefox 109+ | Supported via manifest.firefox.json (sidebar instead of side panel) |
| Safari | Not yet supported |
No build step required — the extension runs directly from source.
# Clone
git clone https://github.com/aymenhmaidiwastaken/Css-Sniffer.git
cd css-sniffer
# Load in Chrome
# 1. Go to chrome://extensions/
# 2. Enable Developer mode
# 3. Click "Load unpacked" and select this directory
Ctrl+Shift+R on the extensions page)content/modules/your-module.js with a global objectbackground/service-worker.js relay listcontent/content.jssidepanel/tabs/tab-yourmodule.jssidepanel/tab-manager.jssidepanel/sidepanel.htmlContributions are welcome! Here are some areas where help is appreciated:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License — see the LICENSE file for details.
Made with <3
Stop guessing CSS. Start sniffing it.