Inspector target bar

Overview

The target bar no longer renders above the Inspector's panels. On a phone it read as a second navigation block that was not one of the app tabs (Chats / Inspector / Settings), it could not be dismissed, and it duplicated answers the Styles panel already gives. The three answers it existed for — which element is selected, which rule a value comes from, and where the edit lands — now live inside the Styles panel: the element chip at the top of its card body, its Element tree section, its Matched rules section (which marks element.style as the write target) and its Receipt strip.

targetBar.js (pure model) and TargetBar.jsx (layout) are kept, and selectionAcrossModes from that module is still used by the Intent surface, which needs a selection that survives the Styles panel being switched off.

The rest of this page documents that model: it is still the reference for how the Styles panel decides which property it describes and where an edit lands.

Usage

Connect to a page and select an element (tap the preview in pick mode, tap Tap element, or type a selector in the Styles panel). The Styles panel then shows:

  1. Element header — the element in DevTools notation (div#standalone-api-panel.standalone-api-panel) with its box size. The size is dropped when the box could not be measured, so a meaningless — × — is never printed.

  2. Matched rules — the rules that match, best answer first: element.style (marked as the write target), then author rules on the element, then inherited rules. Each chip carries its declaration count. Browser-default rules are filtered out by default — their “selector” for a div is the whole HTML element list, which would wrap the row to five lines on a phone; the section lists them on request through its own Show 5 browser default rules control (the rules themselves are chipped browser).

  3. Element tree — the path to the element (html › body › div#standalone-api-panel), current element highlighted, plus one tap to any ancestor and a collapsible child list. Ancestor and child taps use the same code path as the panel's own selection, so the highlight, the pinned element preview and the changed-set reset all stay in sync.

  4. Origin sentence — one line explaining where the focused value comes from and what editing will do, e.g.

  1. Header controls — ✕ Clear, ↻ Refresh and ◎ Pick live in the Styles panel's sticky header.

Behaviour