◉CLAUDE LABJP
●2.1.334 — Claude Code 2.1.334: /model now has a search box once the list passes 25 models, matching names and model IDs●FAST — Fast mode for Claude Opus 4.8 ended on 11/30. Drop speed: "fast" and Opus 4.8 keeps working●OPUS 4.5 — claude-opus-4-5 retires on 2027/1/22, 50 days from now. The replacement is claude-opus-5-5●IME — On the Windows desktop app, pressing Enter to confirm Japanese IME input can send the message early●NEW — New: Compare tool-use requests across three routes before moving to Bedrock●MCP — More setups now share one local MCP server across Claude Code, Cursor and Antigravity●2.1.334 — Claude Code 2.1.334: /model now has a search box once the list passes 25 models, matching names and model IDs●FAST — Fast mode for Claude Opus 4.8 ended on 11/30. Drop speed: "fast" and Opus 4.8 keeps working●OPUS 4.5 — claude-opus-4-5 retires on 2027/1/22, 50 days from now. The replacement is claude-opus-5-5●IME — On the Windows desktop app, pressing Enter to confirm Japanese IME input can send the message early●NEW — New: Compare tool-use requests across three routes before moving to Bedrock●MCP — More setups now share one local MCP server across Claude Code, Cursor and Antigravity
Articles/Claude Code
⟐ Claude Code/2026-10-19Intermediate

The Page Was 90px Too Wide at 375px, and the Culprit Never Showed Up in querySelectorAll

When a pseudo-element causes horizontal overflow on phones, scanning elements finds nothing. A probe script that confirms the culprit by diff, and overflow fixes that keep sticky intact, with measurements.

Claude Code297CSSDebuggingResponsivePlaywright3

✦ Premium Article

I opened my site's billing page at phone width (375px), and the theme switch and menu at the right end of the header had slid off the screen.

document.documentElement.scrollWidth read 465px. The page was 90px wider than the screen, a factor of 1.24 (465 ÷ 375). A menu falling off-screen on the billing page, the one leading into checkout, hurts conversion directly.

I scanned every element for a right edge beyond the viewport. The scan returned zero hits.

The culprit was the ::after of a decoration I had attached to the first section of every page: a golden glow 540px wide. Pseudo-elements appear in neither querySelectorAll nor getBoundingClientRect.

Here I rebuild the same symptom on a small page, write a probe script that pins the cause down to one element including pseudo-elements, and compare fixes. overflow-x: hidden looks like it works, then breaks sticky somewhere else.

A minimal page that reproduces it

Before touching the production page, I rebuilt the structure in about 20 lines. The trigger was a rule that decorates "the first section of every page".

<!doctype html><html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body{margin:0;font:16px/1.7 sans-serif}
header{display:flex;justify-content:space-between;align-items:center;padding:12px 15px;border-bottom:1px solid #ccc}
header button{width:40px;height:40px}
main>div{padding:0 15px}
section{position:relative;padding:24px 0}
/* decoration applied to the first section of every page */
main > div > section:first-child::after{
  content:"";position:absolute;top:0;left:50%;width:540px;height:200px;
  transform:translateX(-50%);background:radial-gradient(closest-side,gold,transparent);
  pointer-events:none;z-index:-1}
</style></head><body>
<header><span>Site</span><button id="menu">≡</button></header>
<main><div>
<section><h1>Membership</h1><p>The first section.</p></section>
<section><h2>Plan</h2><p>The second section.</p></section>
</div></main></body></html>

The section is 345px wide (375px minus 15px of padding on each side). Centering a 540px glow on its midpoint at 187.5px puts the right edge at 187.5 + 270 = 457.5px.

Measured in headless Chromium at 375×800, scrollWidth was 458px. Production read 465px; the difference comes from section width and padding, and the structure is the same.

The element scan returns zero

The first thing most of us write is a loop that looks for elements whose right edge sits beyond the viewport.

const vw = document.documentElement.clientWidth;
[...document.body.querySelectorAll('*')]
  .filter(el => el.getBoundingClientRect().right > vw + 0.5);
// → [] (zero hits on the repro page and in production)

::after is not a DOM element, so this loop never visits it. The result says "nothing overflows", and the investigation stalls with no cause in sight.

This is where I lost the most time. When the result is empty, I now suspect "something exists that the scan cannot reach" before I suspect my measuring method.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You can run a probe script on your own page that pins down a horizontal-overflow culprit to one element, pseudo-elements (::before / ::after) included
✦You can decide between overflow-x hidden, clip, and a root-level rule without breaking sticky elements
✦You can hand Claude Code the measured facts instead of just saying 'it overflows', and skip several rounds of guess-and-patch
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-10-28
Back From Checkout, the Button Stayed on Processing: Why I Fixed It With pageshow, and the 3 Files My Audit Still Found
When you press Back from Stripe or another external page, a checkout button can stay stuck on Processing. I reproduce the bfcache cause in a real browser, compare pageshow with no-store, and add a repo audit script and a CLAUDE.md rule.
⟐ Claude Code2026-12-03
Splitting a Pre-Release iOS App into Three Review Areas for Claude Code, and Verifying Every Finding Before Fixing It
Before submitting two iPhone wallpaper apps for review, I split a static audit into three areas by user flow and gave each to a read-only Claude Code subagent. Here are the mechanical checks, the findings ledger, and the silent bugs hiding behind zero crashes.
⟐ Claude Code2026-11-26
Per Callback, or Once at the Door? Deciding What Claude Code Should Touch on the Day I Installed an Ads SDK Migration Skill
Android's ads SDK is changing generations, and every callback will now arrive on a background thread. The official migration skill says to switch to the UI thread inside each callback; I chose to switch once, at the entrance of my ad wrapper layer. Three tools — an inventory scanner, an entrance-level normalizer, and a PreToolUse hook that fences Claude Code's edits on the migration branch — and the reasoning behind the choice.