Build1 distinct publisher3 min readUpdated
A Chrome extension author's notes on overlaying designs onto live pages come down to one bug repeated: mixing viewport space with document space, and CSS pixels with device pixels.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
A developer spent a few weeks building a Chrome extension that drops a design frame over a running page so you can see where the implementation drifted, then wrote up the four things that cost real time [1]. The most useful one is not a styling bug at all: an overlay drawn with `position: fixed` lives in viewport space while the content it is measuring lives in document space, so the alignment holds only at the scroll offset where you made it [2][3].
The author's example is the whole argument. Line the design up at the top of the page, scroll down two hundred pixels, and the design has slid two hundred pixels relative to the content it is supposed to match [4]. The error is not noise, it is equal to the scroll depth, which means it grows 1:1 with every wheel event [19]. Nothing throws. The overlay is semi-transparent and roughly the right shape, so what you see is not a broken tool, it is a page that appears to be wrong [4].
The fix is to put the overlay where the content is: `position: absolute`, `top: 0`, `left: 0`, and a `translate3d` for the offset [5]. Anchored at the document origin, the browser scrolls it in step with the content for free, with no scroll listener and no per-frame repositioning [6]. The companion detail is that new layers should be created at `window.scrollX` and `window.scrollY`, not at the document top, or a layer added halfway down a long page lands off-screen and the user concludes the click did nothing [7].
The second trap is the same category of mistake in a different unit. Design exports are routinely 2x or 3x, so a 1440-wide frame arrives as a 2880-pixel PNG [8]. Setting `naturalWidth` as the CSS width, which is the obvious move, renders it at 2880 CSS pixels [9], covering four times the intended area once both dimensions are scaled [18]. When you fetch from a design API you asked for the scale, so you divide it out [10]. When the user drops in a file you cannot: a PNG carries no record of its export scale, and the author's position is that there is no heuristic worth trusting [11]. The single exception he automates is a high-density screenshot, detected by comparing the image width against `clientWidth * devicePixelRatio` inside a tolerance of `max(8, expected * 0.01)` [12]. Everything else stays at true size behind a visible scale control, on the reasoning that a silently mis-scaled overlay is worse than one the user has to adjust [13]. He also keeps source dimensions beside displayed ones and always computes from the source, because scaling relative to the current size accumulates rounding drift until "100%" no longer means the original [14].
The third item is containment, and it is where the two problems separate cleanly. Injected UI is at the mercy of the host stylesheet, including resets, a global `* { box-sizing }`, a stray `img { opacity: 1 }`, or another extension's rules, and a closed shadow root blocks traffic in both directions [15][16]. But the overlay images stay outside it, appended to `document.body`, precisely because they need document coordinates [17]. Style isolation and coordinate placement are different requirements, and one container cannot serve both.
Worth checking in any tool that pins annotations to a page: whether new markers are anchored to the current scroll position [7], whether there is an explicit scale control rather than a guess [13], and whether repeated resizes are computed from source dimensions [14]. All three failures pass code review and produce plausible-looking output.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
A developer spent a few weeks building a Chrome extension that puts a design frame on top of a running web page so you can see where the implementation drifted, and wrote up four traps that cost real time.
The obvious way to draw the overlay is position: fixed, and it is wrong the moment the user scrolls.
The page content being compared against lives in document space, while a fixed overlay lives in viewport space.
Line the overlay up at the top of the page, scroll down two hundred pixels, and the design has silently slid two hundred pixels relative to the content it is supposed to match; every alignment is gone and it looks like the page is wrong.
The fix is to put the overlay in document space: position = absolute, top = 0, left = 0, and transform = translate3d(layer.x px, layer.y px, 0).
Anchored at the document origin and offset with a transform, the browser scrolls the overlay in step with the content for free: no scroll listener, no repositioning on every frame, no jank.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Single self-reported source with checkable mechanics
All claims trace to one first-person dev.to post with no corroborating source. Evidence quality is lifted by specificity — concrete code snippets, an explicit tolerance formula, and reproducible arithmetic (1440 at 2x becomes 2880) that a reader can verify against browser behavior — but lowered by the absence of any independent replication, named artifact, or measurement of the claimed 'no jank' benefit.
No adoption signal in the cluster
The supplied source names no extension, repository, release, install count, or third-party user, and reports no deployment or benchmark. There is nothing to measure adoption against, and no adoption observations could be recorded from this cluster.
Claims sit slightly below their generality
The post makes no market, performance-leadership, or novelty claims; it explicitly says the overlay idea is old and that no reliable scale heuristic exists, and it prefers a visible manual control over guessing. The prescriptions are in fact more broadly applicable than the modest 'four things that bit me' framing implies, so the rhetoric is marginally understated relative to the evidence rather than overstated.
Mild self-presentation incentive, no commercial pull
The author is writing about their own in-progress Chrome extension on a developer publishing platform, which carries a modest reputational and audience-building incentive. Countervailing factors keep it low: no product name, link, pricing, sponsor, or call to action appears, and the post volunteers its own bugs and unsolved limitations, which cuts against promotional framing.
Moderate: internally consistent but uncorroborated
Confidence is limited by a single publisher and single source with no independent verification or adoption data. It is supported by the claims being narrow, mechanistic, internally consistent, and stated with enough implementation detail that a reader can test them, and by two derived claims that follow arithmetically from figures in the source.
build
The third answer: a dead-code tool allowed to say "not traced yet"1 distinct publisher
build
The infinite transition: a two-line CSS latch that keeps hover state and stores nothing1 distinct publisher
build
Container queries pay off component by component, not as a breakpoint purge1 distinct publisher
build
A 200-post blog audit found three defects, none of them visible on the author's own screen1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 15, 2026