From frontend
Detects pixel drift from CSS/HTML changes by measuring element bounding rects and computed styles before/after edits with browser_evaluate.
npx claudepluginhub fubits1/svelte-skills --plugin frontendThis skill uses the workspace's default tool permissions.
When making **any** CSS change or HTML element swap (e.g. `<dl>` to `<ul>`, `<div>` to `<section>`), follow this workflow exactly. Screenshots alone prove NOTHING about pixel parity — only measured numbers do.
Suggests manual /compact at logical task boundaries in long Claude Code sessions and multi-phase tasks to avoid arbitrary auto-compaction losses.
Share bugs, ideas, or general feedback.
When making any CSS change or HTML element swap (e.g. <dl> to <ul>, <div> to <section>), follow this workflow exactly. Screenshots alone prove NOTHING about pixel parity — only measured numbers do.
Use browser_evaluate to capture exact values for every affected element:
// Capture dimensions
el.getBoundingClientRect() // width, height, x, y
// Capture computed styles — the ACTUAL rendered values, not what CSS says
getComputedStyle(el).display // may differ from your CSS (global overrides!)
getComputedStyle(el).gap
getComputedStyle(el).margin
getComputedStyle(el).padding
getComputedStyle(el).lineHeight
getComputedStyle(el).fontSize
Store these numbers. Report them. They are your baseline.
Global styles, resets, and browser defaults frequently override scoped CSS. A <dl> might render as display: grid; gap: 16px even though scoped CSS says display: flex; gap: 8px. Never assume — always measure.
Edit the HTML/CSS.
Navigate to the same page. Measure the same elements with browser_evaluate. Report the numbers side by side.
After git stash pop, git checkout, or file restoration, the dev server may serve stale CSS. Touch the file (touch path/to/file) and hard-reload before measuring.
Report a table:
| Metric | Before | After | Diff |
| -------------- | ------ | ----- | ---- |
| footer height | 396px | 396px | 0 |
| section height | 98px | 98px | 0 |
If any measurement differs by even 1px:
| Trap | Example | Fix |
|---|---|---|
| Browser default margins | <ul> has margin: 0 0 16px, <dl> has margin: 1em 0 | Explicitly reset margin: 0 |
| Browser default padding | <ul> has padding-left: 40px | Explicitly reset padding: 0 |
| Default line-height | <li> gets line-height: 1.5 from UA stylesheet | Set line-height: 1 or match original |
| Global CSS overrides | A global dl { display: grid } overrides scoped display: flex | Measure computed styles BEFORE changing elements |
| Scoped CSS not matching | Changed & dl to & ul but Astro scoping attrs differ | Touch file + reload to force CSS rebuild |