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 fate, a modern Relay successor dropping GraphQL DSL for TypeScript, tRPC and Vue — cnakazawa · 2026-10-01
- Building a coding agent with DSPy + Jev: six files, five layered agent patterns — dbreunig · 2026-10-01
- Gemini 4 Argon launches, agentic software factories and agent skills data headline daily reads — rseroter · 2026-10-01
- Dev shares Claude Projects workflow: dump messy thoughts into chat and let it sort them — bcherny · 2026-10-01
- Claude Code head merged 1,700 PRs this year, all code written by Claude Code — rohanpaul_ai · 2026-10-01
- szmcp: A Rust ZIM MCP Server Giving Local LLMs an Offline Wikipedia — Federal-Effective879 · 2026-10-01