Search CodeHorizon

Products

CSS Class HighlighterChrome extension · Live ShopGradeChrome extension + web app · Live SecureVaultAndroid app · Live Companion AIAndroid app · Live Speaker CleanerAndroid app · In testing NickedAndroid game · In testing TubeFocusChrome extension · Live TabClusterChrome extension · Live NotiloPast Chrome extension · Past project

Pages

HomeThe studio ServicesWebsites, stores, extensions and apps Case studiesSelected work ProcessHow a project runs All productsThe complete collection JournalEvery release, newest first Start a projectPlan it in a minute
move openEsc close

CSS Class Highlighter

Chrome extensionLive

Your page. Its classes. Every detail.

A CSS workbench by CodeHorizon for frontend debugging and design system reviews. Version 4.1.0 adds element inspection, live class highlights, style comparison and design tokens, with Material Design 3 Expressive and Google Sans.

Platform
Chrome
Version
4.1.0
Updated
13 Oct 2026
Price
Free
Role
Sole developer
Timeline
2025 to 2026
Stack
TypeScriptReactViteManifest V3Shadow DOMchrome.storage.sync

The problem

Why CSS Class Highlighter exists

A class name is only part of the story. To understand a page, you also need to see where that class appears, which styles reach the element, and what changed between two states. The workbench brings these checks together on the page you are building. Pick an element, follow its classes, compare its styles and explore the tokens behind the design.

Before

  • Class names without their style context
  • Repeating checks across elements
  • Copying a class list by hand

With CSS Class Highlighter

  • A workbench beside your page
  • CSS baselines with a readable diff
  • Filtered class and token exports
The hardest part
A full CSS workbench that can open on any page, keep a live index of every class, and still leave that page responsive.

How it works

How you use it, step by step.

From installing it to the result you are after.

  1. Element inspection, box model and CSS context
  2. Live CSS class discovery and pinned highlights
  3. Computed CSS comparison with a 26px to 40px spacing change
Element inspection, box model and CSS context
Element inspection, box model and CSS context
Live CSS class discovery and pinned highlights
Computed CSS comparison with a 26px to 40px spacing change

Under the hood

How it is built.

Version 4.1 rebuilds the extension as a developer workbench. Pick an element to read its box model, computed properties, readable matching rules, attributes and basic accessibility context, then copy an escaped selector, its HTML, a CSS snapshot, or a JavaScript locator that keeps frame and open shadow-root boundaries.

A live class inventory covers the document, open shadow roots and same-origin frames. Save a computed-CSS baseline and compare it with another element or a later state, or explore the resolved CSS variables behind a design. The popup, preferences and inspector share one Material Design 3 Expressive interface.

  1. 01

    Loader

    A small script on permitted pages

    Only a lightweight loader runs on the pages you visit. The React workbench and its fonts load when you ask for them, or when auto-open is on for that site.

  2. 02

    Service worker

    Lazy activation, serialised storage

    It activates the workbench in a tab, handles keyboard commands and the context menu, and applies preference changes one at a time.

  3. 03

    Engine

    Traversal, a live class index, CSS inspection

    It walks the document, open shadow roots and same-origin frames, keeps the class index current as the page changes, draws highlights and reads matching rules.

  4. 04

    Workbench

    React, inside its own Shadow DOM

    The inspector and a virtualised class browser render in a shadow root, so the page’s styles can’t restyle the controls.

01

Bounded by design

Regex search accepts up to 200 characters with one repetition, the index stops at 100,000 elements, and rule inspection scans at most 6,000 rules for up to 200 matches, so a heavy page stays responsive.

02

Highlights that keep up

Pinned highlights follow scrolling and layout changes, skip matches that are off screen, and respect a visible limit you set.

03

Preferences that never collide

A site override stores only the fields you changed, so later global changes still apply. Writes are serialised and briefly batched to avoid conflicts and excess Chrome Sync calls.

04

A careful upgrade

Version 3 site settings migrate to the version 4 schema, and an old record is removed only after its replacement has been saved.

TypeScriptsrc/content/engine/inspect.tslines 124 to 151, cut short
export function readableRules(element: Element) {
  const root = element.getRootNode() as Document | ShadowRoot;
  const sheets = new Set<CSSStyleSheet>([
    ...('styleSheets' in root ? Array.from(root.styleSheets) : []),
    ...Array.from(
      root.querySelectorAll<HTMLStyleElement | HTMLLinkElement>('style, link[rel="stylesheet"]'),
    ).flatMap((node) => (node.sheet ? [node.sheet] : [])),
    ...(root.adoptedStyleSheets ?? []),
  ]);
  const rules: MatchedRule[] = [];
  let unavailable = 0;
  let visited = 0;
  const walk = (list: CSSRuleList, source: string, condition = '') => {
    for (const rule of Array.from(list)) {
      if (++visited > 6000 || rules.length >= 200) return;
      if ('selectorText' in rule && 'style' in rule) {
        const styleRule = rule as CSSStyleRule;
        try {
          if (element.matches(styleRule.selectorText))
            rules.push({
              selector: styleRule.selectorText,
              css: styleRule.style.cssText,
              source,
              condition,
            });
        } catch {
          /* Pseudo-elements and nested selectors need DevTools cascade inspection. */
        }
        // …
From the sourceMatching rules, within a budgetIt reads every stylesheet in the element’s root, adopted sheets included, follows @media and @supports only when they apply, and stops after 6,000 rules or 200 matches, so a heavy page never stalls.

Decisions

The calls I made, and what they cost.

Each decision lists the reason for it and what it gave up.

  1. 01

    Load the workbench only when it is asked for

    Why

    A lightweight loader is all that runs on the pages you browse, so everyday browsing pays almost nothing for the extension.

    Trade-off

    The first open on a page waits a moment for the workbench to load.

  2. 02

    Give the workbench its own Shadow DOM

    Why

    Whatever site it opens on, page styles can’t restyle its controls. Version 3 had tried a shadow root and dropped it; version 4 is built around one from the start.

  3. 03

    Hard limits instead of scanning everything

    Why

    A huge page or a costly pattern should never freeze the page being inspected.

    Trade-off

    Matching rules are a source view. Chrome DevTools is still the place for full cascade order, pseudo-elements and complex nested selectors.

From version 3 · A bug worth telling

A panel that flickered forever

What happened
The floating panel flickered without end as soon as the pointer went over it.
Why
Pointing at the panel made the panel the element being inspected, which redrew it, which fired another mousemove: a loop, sixty times a second.
The fix
pointer-events: none on the whole panel. It only shows things, so the pointer passes through to the element underneath.

What I tried first

  • A DevTools panelThe first version was one. It worked, but needed DevTools open, which defeated the point.
  • A shadow root for the panelIt kept the page’s CSS out, but also blocked events that click-to-copy needed. A normal element with tightly scoped class names worked.

What I learned

  • If the panel receives its own hover events, it flickers in a loop. Pointer events have to be intercepted selectively.
  • Shadow DOM and iframes are hard boundaries, and SVGs don’t always have a usable classList.

Screens

What it looks like.

01 / 05
01Element inspection, box model and CSS context
02Live CSS class discovery and pinned highlights
03Computed CSS comparison with a 26px to 40px spacing change
04Inherited design tokens and resolved CSS variables
05Matching selectors and readable CSS declarations

Features

What you get.

01

An inspector with context

See the selected element, box model, computed styles, readable matching rules, attributes and basic accessibility details in one workbench.

02

Live class discovery

Search and sort class names, filter generated names, set a minimum match count and jump from a class to an element.

03

Highlights you can keep

Preview a class or pin several highlights. Customise their appearance globally or for individual sites.

04

A clear view of CSS changes

Save a computed CSS baseline and compare another element or a later state. Review dimensions, classes and styles, then copy the complete diff as JSON.

05

Design tokens in context

Explore resolved CSS custom properties, inherited values and colour previews. Search names or values, then copy declarations or token JSON.

06

Made for your workflow

Google Sans, Material Design 3 Expressive, light and dark themes, keyboard shortcuts, per-site settings and JSON or CSV class exports.

Your data

Page inspection runs in your browser. CSS results and comparison baselines are not sent to CodeHorizon. Preferences and the origins of sites you customise use Chrome Sync. Copies and file exports happen only when you request them. There are no accounts, ads, analytics or remote code.

Read the privacy policy

Questions

Good questions.

Something else? Ask me directly.

Which version is on the Chrome Web Store?

Version 4.1.0, published on 13 October 2026. It is the new workbench shown on this page, with CSS comparison, design tokens and class exports.

How do I open the workbench?

Open a regular webpage and choose Inspect page or Browse classes from the popup. The page context menu and Alt+Shift+C shortcut also open inspection. Chrome lets you reassign shortcuts when another extension uses them.

Can it inspect every page and stylesheet?

Chrome internal pages and the Chrome Web Store block extension inspection. Cross-origin frames, closed shadow roots and protected stylesheet rule text are unavailable. Local file inspection requires Chrome file URL access. Version 4.1.0 requires Chrome 127 or later.

Does it replace Chrome DevTools?

It helps you inspect CSS, explore classes and compare visual states on the page. Chrome DevTools remains useful for editing code, full cascade ordering, pseudo-elements and browser debugging.

Does CodeHorizon receive my page data?

No. Inspection results stay in the browser, and comparison baselines stay in memory until the workbench closes. Global and per-site preferences, including customised site origins, use Chrome Sync and may follow your Google sign-in. CodeHorizon does not receive those preferences.

Is it free?

Yes. There is no account, subscription or paid feature.

Milestones

From the first line to today.

  1. Mar to May 2025

    First version

    Inspect Mode, the class list, and copying a selector.

  2. Aug 2025

    3.2.8

    Settings for each site, with options to hide hashed class names.

  3. 12 Oct 2026

    4.1.0 goes to review

    A rebuilt developer workbench is submitted to the Chrome Web Store.

  4. 13 Oct 2026

    4.1.0 is live

    CSS comparison, design tokens, a live class inventory and exports, with Material Design 3 Expressive and Google Sans.

  1. Updatev4.1.0

    CSS Class Highlighter 4.1.0 is live

    The new developer workbench is now available to everyone from the Chrome Web Store.

    • Inspect any element with its box model, computed styles and readable matching rules.
    • Search live class counts, pin highlights and export the class inventory as JSON or CSV.
    • Compare computed CSS against a saved baseline and explore inherited design tokens.
    • Material Design 3 Expressive with bundled Google Sans, and light and dark themes.

For businesses

Like how CSS Class Highlighter turned out? I can build yours.

Websites, Shopify stores, Chrome extensions and Android apps, designed and engineered with the same care as my own products.

Booking new projects

Tell me what you’re building.

I read every message myself and reply within a day or two with honest next steps.

  1. 01You share the ideaA few lines is plenty. Links to anything similar help.
  2. 02We talk it throughOne short conversation by email or a quick call.
  3. 03You get a clear planScope, timing and a price that fits, before any work starts.
Just say helloFour fields, that is all

Your details come straight to my inbox and are only used to reply. Nothing is stored on this site or shared.

Project plannerTakes about a minute
01What do you need?Pick any that fit. Skip it for a quick hello.
02Budget
03Timeline
04Tell me about it

Your details come straight to my inbox and are only used to reply. Nothing is stored on this site or shared.