CSS Inspector Extension

Quickly inspect and copy CSS from any element on any webpage

View the Project on GitHub dangtrannam/css-inspector-extension

CSS Inspector - Chrome Extension

Quickly inspect and copy CSS from any element on any webpage.

Demo

CSS Inspector Demo

https://github.com/user-attachments/assets/screenshots/recording-1.mp4

Features

Installation

From Source (Development)

  1. Clone/download this repository
  2. Open Chrome and go to chrome://extensions/
  3. Enable Developer mode (top right toggle)
  4. Click Load unpacked
  5. Select the css-inspector-extension folder

Usage

  1. Click the extension icon in Chrome toolbar
  2. Click Start Inspecting
  3. Hover over any element to highlight it
  4. Click to select and extract CSS
  5. Copy selector or full CSS styles

Project Structure

css-inspector-extension/
├── manifest.json           # Extension configuration (MV3)
├── background.js           # Minimal service worker for extension lifecycle
├── popup.html              # Popup UI structure
├── popup.css               # Popup styling (Glassmorphism theme)
├── popup.js                # Popup logic and communication
├── src/
│   ├── scripts/
│   │   └── content-script.js   # In-page element inspection, CSS extraction, panel rendering
│   ├── styles/
│   │   └── overlay.css         # Styles for overlay, panel, and rulers injected into page
│   └── images/
│       ├── icon.svg            # Source SVG for icons
│       ├── icon-16.png         # Extension icon (16x16)
│       ├── icon-48.png         # Extension icon (48x48)
│       └── icon-128.png        # Extension icon (128x128)
├── docs/                   # Project documentation
├── plans/                  # Implementation plans and reports
├── test-page.html          # Development test page for quick validation
└── README.md               # Project overview and usage guide

Permissions

Security Note: The extension uses minimal permissions. Content scripts are only injected when you click “Start Inspecting” on supported pages (excludes chrome://, chrome-extension://, and about: pages).

Browser Support

Development

No build step required. Edit files directly and reload extension.

# Package for Chrome Web Store
zip -r css-inspector.zip . -x "*.git*" -x "docs/*" -x "plans/*" -x "test-page.html" -x ".claude/*" -x "src/images/*.error.txt" -x "*.mp4" -x "*.webm" -x "*.mov" -x "*.avi" -x "*.mkv" -x "_config.yml" -x "repomix-output.xml"

License

MIT