Cross browser typography qa

From AtlasOmnia/hermes-custom-pack · View interactive version

Cross browser typography qa is an AI agent skill from the GitHub repository AtlasOmnia/hermes-custom-pack. cross-browser-typography-qa — Diagnose and verify web typography rendering defects across Chromium, WebKit, and native Safari, including clipped glyphs, broken descenders, wrapping, font metrics, gradient text, and live-cache mismatches.

How to use this skill

Skill file

Cross-Browser Typography QA

Purpose

Use this skill when web text looks clipped, flattened, wrapped incorrectly, misaligned, or materially different between Chromium and WebKit/Safari. Treat text rendering as both a geometry problem and a visual paint problem: passing DOM bounds does not prove that every glyph is intact.

Triggers

Workflow

1. Reproduce the exact defect

  1. Record the browser family, viewport, font family, weight, size, and exact text.
  2. Use a string containing ascenders, rounded forms, punctuation, and descenders.
  3. Capture a focused screenshot at the reported viewport before changing CSS.
  4. Inspect the actual glyphs, not only the element rectangle.

2. Inspect layout and paint

Read computed values for:

Use Range.getClientRects() for rendered-line counts and getBoundingClientRect() for containment, but never treat either as proof that glyph paint is complete.

3. Repair the cause

Choose the smallest stable repair:

Mixed-inline-content spacing regression

Treat a screenshot showing PressStart Sessionto...-style spacing as a layout-structure defect before changing font metrics. Inspect the parent display mode and child structure; if text nodes surround an inline child in a flex container, use one wrapper element rather than inserting arbitrary literal spaces or changing word-spacing. Rebuild the production renderer and capture the exact installed process/window after replacement so stale or pre-fix surfaces cannot be mistaken for current evidence.

4. Verify locally

Test at minimum:

Before accepting any narrow screenshot, prove that the CSS viewport is actually narrow. Some headless Chromium invocations keep a minimum layout viewport around 500 CSS px and crop a --window-size=390 screenshot to 390 physical pixels. In-page, read innerWidth, document.documentElement.clientWidth, and document.documentElement.scrollWidth. If innerWidth does not equal the requested width, use CDP Emulation.setDeviceMetricsOverride, assert the width again, and only then inspect the screenshot. When overflow is real, inspect element bounding boxes and repair intrinsic grid/flex sizing with minmax(0, 1fr) or min-width: 0; do not hide the defect with overflow-x: hidden before identifying its cause.

Require:

When visual evidence follows an interaction, make UI state explicit. For a mobile menu, capture the open state after aria-expanded="true" and visible-link checks, then close it and wait for both aria-expanded="false" and the menu to become non-displayed before taking the clean layout screenshot. A successful click or DOM-count pass does not prove the screenshot captured the intended state.

5. Verify production

  1. Add a new stylesheet cache marker when deploying changed CSS.
  2. Load a fresh production URL, preferably with a harmless query marker.
  3. Read back the live stylesheet URL and computed values.
  4. Capture a fresh live screenshot and inspect the originally failing glyphs.
  5. Treat deployment success as transport evidence only; close the defect from live rendering evidence.

Common pitfalls

Verification snippet

const el = document.querySelector('.gradient-text');
const cs = getComputedStyle(el);
const rect = el.getBoundingClientRect();
({
 stylesheet: document.querySelector('link[rel="stylesheet"]')?.href,
 fontFamily: cs.fontFamily,
 fontWeight: cs.fontWeight,
 lineHeight: cs.lineHeight,
 overflow: cs.overflow,
 backgroundClip: cs.backgroundClip,
 webkitTextFillColor: cs.webkitTextFillColor,
 rect: { top: rect.top, bottom: rect.bottom, height: rect.height }
});

This snippet confirms state; it does not replace visual inspection.

Public support files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.