Skip to content

fix(highlighter): center the inspector card's selector on its letters - #1201

Merged
ankit merged 2 commits into
mainfrom
claude/inspector-card-selector-centering
Oct 13, 2026
Merged

ankit merged 2 commits into
mainfrom
claude/inspector-card-selector-centering

Conversation

@ankit

@ankit ankit commented Oct 13, 2026

Copy link
Copy Markdown
Owner

The hover card's selector (e.g. #firstHeading) sat about 1px above center. The layout was centered; Geist Mono's tall ascent puts the glyphs high in their line box.

  • Trim the selector's line box to its letters with text-box: trim-both cap alphabetic, so the letters themselves center
  • Give the card a minimum content height so it keeps its height without a rule-count badge (33px, was 31.6px)

Firefox doesn't support text-box yet and stays as before.

Tested: measured the card in a built extension on Wikipedia, with and without the badge; the selector, badge and card share one center.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Bundle size

No change to what the popup or content scripts load.

Bundle Size Change Gzip Change
Popup 174.7 KB – 48.1 KB –
fonts/fonts.css 2.9 KB – 458 B –
popup/index.css 23.3 KB – 5.2 KB –
popup/index.js 148.5 KB – 42.5 KB –
Content script (document_start) 78.5 KB – 21.2 KB –
editor/index.js 40.2 KB – 10.2 KB –
inject-css/index.js 35.2 KB – 9.6 KB –
site-bridge/index.js 3.1 KB – 1.4 KB –

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ankit
ankit force-pushed the claude/inspector-card-selector-centering branch from 77c5292 to 919cdb0 Compare October 13, 2026 21:12
@ankit
ankit merged commit ed5896f into main Oct 13, 2026
7 checks passed
@ankit
ankit deleted the claude/inspector-card-selector-centering branch October 13, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant