A powerful browser extension for developers to inspect, compare, and analyze CSS properties across different elements and breakpoints.
- Instant CSS Inspection - Hover over any element to see its computed styles
- One-Click Copy - Click highlighted elements to copy CSS to clipboard
- Smart Grouping - Styles organized by Layout, Typography, Background, Border, and Other
- Pin Elements - Press
Por click the pin button to lock an element - Side-by-Side Diff - Compare CSS between two elements with color-coded differences
- Smart Highlighting:
- Purple: Properties only in current element
- Pink: Properties only in pinned element
- Orange: Properties with different values
- Copy Differences - Click to copy only the CSS that differs
- Multi-Breakpoint View - Press
Ror click the monitor button - Preset Breakpoints:
- Mobile (375px)
- Tablet (768px)
- Desktop (1440px)
- Change Detection - Automatically highlights properties that change at each breakpoint
- No Browser Resize - See all breakpoints without resizing your window
| Key | Action |
|---|---|
Escape |
Exit scanning mode or unpin element |
P |
Pin current element for comparison |
R |
Toggle responsive breakpoint view |
- Navigate to
chrome://extensions/ - Enable "Developer mode" (top right)
- Click "Load unpacked"
- Select the extension directory
- Navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select the
manifest.jsonfile
css-scan-extension/
├── icons/ # Extension icons
├── scripts/
│ ├── style-extractor.js # CSS extraction and filtering logic
│ ├── style-panel.js # Main panel UI component
│ ├── panel-renderers.js # Normal and comparison mode renderers
│ ├── panel-features.js # Pin and responsive mode features
│ ├── responsive-renderer.js # Breakpoint rendering logic
│ ├── scanner.js # Main scanner class with event handling
│ ├── content-new.js # Entry point and message handling
│ └── background.js # Service worker for extension lifecycle
├── styles/
│ └── content.css # All extension UI styles
├── manifest.json # Extension configuration
└── README.md # This file
The extension uses a modular architecture for maintainability:
- style-extractor.js - Extracts and groups CSS properties
- style-panel.js - Core panel UI and state management
- panel-renderers.js - Renders different view modes
- panel-features.js - Implements pin and responsive features
- responsive-renderer.js - Handles breakpoint visualization
- scanner.js - Manages element scanning and highlighting
- content-new.js - Coordinates all modules
Example: Adding a new CSS property group
Edit scripts/style-extractor.js:
const propertyMap = {
Layout: [...],
Typography: [...],
YourNewGroup: ['property-1', 'property-2'] // Add here
};Example: Adding a new breakpoint
Edit scripts/style-panel.js:
this.breakpoints = [
{ name: "Mobile", width: 375, icon: "smartphone" },
{ name: "YourBreakpoint", width: 1024, icon: "tablet" }, // Add here
];All styles are in styles/content.css with CSS variables for easy theming:
:root {
--scan-bg: #0a0a0a; /* Main background */
--scan-accent: #3b82f6; /* Accent color */
--scan-text: #fafafa; /* Text color */
/* ... more variables */
}- Make your changes
- Go to
chrome://extensions/ - Click the refresh icon on the CSS Scan extension
- Test on any webpage
- Chrome 88+
- Edge 88+
- Firefox 89+ (with minor adjustments)
When contributing, please:
- Keep modules focused and under 200 lines
- Follow the existing code style
- Test on multiple websites
- Update this README if adding features
MIT License - feel free to use and modify!