PSA to coding agents: keep CSS :has() rules tight to avoid huge style recalcs
jh3yy · x · 2026-11-07
Front-end developer jh3yy issues a PSA for the era of AI-generated CSS: keep :has() rules tight — no wildcards, no broad targets, and avoid patterns like .component:has(.something) button.
The reason: agents love slapping :has() onto landmark elements, and seemingly unrelated broad :has() rules can trigger huge style recalculations that tank page performance. A practical pitfall-and-avoidance tip drawn from real AI coding workflows.
More from coding & agent
- Google DeepMind's Ivan Leo to reveal how agents cheat on benchmarks at scale at AIE Code — jocarrasqueira · 2026-11-07
- Sudo mode verification revamp: passkey-first UX, inbox deep links, paste capture — JohnPhamous · 2026-11-07
- Amp teases a new way to interact with agents — vinvan · 2026-11-07
- Cryptographers flag that AI agents fail Cloudflare challenges; blind signatures may fix it — jedisct1 · 2026-11-07
- Vercel Tracing goes GA on all plans, enabled by default in Next.js 16.5 — cramforce · 2026-11-07
- Decompiling Battlefield 1942 with Claude Code costs ~$100 in API tokens — alvelda · 2026-11-07