Smooth autosizing textareas: wrap field-sizing:content with a ResizeObserver to transition height
jh3yy · x · 2026-10-01
Front-end dev jh3yy shares a practical CSS trick: field-sizing: content autosizes textareas, but the height snaps instead of animating. The fix is to wrap the textarea and sync the wrapper's height with a ResizeObserver, letting the height change go through a CSS transition.
A copy-paste-ready combo for chat inputs, comment boxes, or anywhere you want smooth height animation.
More from coding & agent
- Dev ships throwaway Postgres for agents: pg19 via pglite on Cloudflare DO over raw TCP — ritakozlov · 2026-11-29
- Product idea: cloud Android VMs and home WiFi proxies to make agents look human — Darpinian · 2026-11-29
- 38 free agent skills distilled from shipping three live AI products — PawelHuryn · 2026-11-29
- Step 5: run evals on synthetic data pre-launch, watch real traces after — PawelHuryn · 2026-11-29
- Break your agent before attackers do: 6 tests mapped to OWASP LLM Top 10 — PawelHuryn · 2026-11-29
- PM shares playbook for shipping 4 customer-facing Claude agents into production — PawelHuryn · 2026-11-29