This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

padding:16px;margin-bottom:14px}

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This userscript adds a floating CSS Unit Inspector panel to any webpage that analyzes all CSS values on the page and detects which units are being used. It supports 15 unit types: px, em, rem, %, vh, vw, vmin, vmax, ch, ex, pt, pc, in, cm, and mm. For each unit, it displays the total usage count, the distribution across CSS properties (e.g., font-size, margin, padding, width), and examples of elements where the unit appears. A search filter allows you to find specific units quickly. The panel also shows the total number of unit uses and the number of unit types present on the page. You can copy a complete unit usage report to the clipboard for documentation or analysis. All panel interactions use the BGPanel component, which automatically persists per-site position and collapse state.

WHERE IT RUNS

The script runs on all websites (*://*/*) through the BotGentz extension. It does not require any special permissions beyond those already granted by the extension. It works in any modern browser that supports the BotGentz userscript environment. The panel appears automatically on every page load, ready to assist with CSS unit analysis.

HOW TO USE

The panel appears as a floating bubble in the bottom-right corner of your browser window. Click the bubble to expand the panel. The "CSS Units" section displays a list of all units found on the page, sorted by usage frequency. Each unit entry shows the unit name, total usage count, and a distribution breakdown of which CSS properties use that unit. Examples of elements using each unit are also shown. Use the search input to filter units by name. Click "Copy Report" to copy a complete unit usage report to your clipboard in plain text format. Click "Refresh" to rescan the page for units after dynamic content changes.

UNIT EXTRACTION WITH PROPERTY DISTRIBUTION AND EXAMPLE CAPTURE

The script iterates through every visible element on the page using document.querySelectorAll('*'), filtering out hidden elements (zero width or height). For each element, it retrieves all computed styles using window.getComputedStyle(), iterating through every CSS property. It scans each property value using a regular expression that matches numeric values followed by unit identifiers, capturing all 15 unit types. For each match, the script tracks the unit name, increments its usage count, records which property it appeared in, and stores up to three example elements (displayed as tag#id.class with the property and value). The unit data is aggregated and displayed with property distribution percentages, helping developers understand which units dominate the page's styles and where specific units are commonly used.

THE PANEL

The panel is built using the BGPanel component, which provides a consistent, accessible interface across all BotGentz tools. It supports drag-to-reposition via the header, collapse on click, and stores the panel's position and state per site using GM_setValue. The panel includes a close button (✕) to dismiss it temporarily—the panel reappears on next page load. The settings section includes a dropdown for selecting panel position (bottom-right, top-right, bottom-left, top-left), which is saved globally. The panel has a fixed width of 380px and a maximum height of 80vh, with scrolling for content that overflows. The unit list has a maximum height of 300px with internal scrolling.

PLEASE NOTE

Requires the free BotGentz extension to run. The script scans all visible elements on the page—on very large pages with many elements and properties, this may take a moment. The unit detection uses computed styles, which means units from CSS variables, inherited values, and calc() expressions are included as they resolve to their final values. The script does not collect, store, or transmit any personal data. All unit data is read from the page and displayed locally. The copy report includes all unit usage data in a structured plain-text format. The property distribution shows percentages based on the total property occurrences for each unit, not the total unit uses across the page.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.