Jake Archibald
Read post

The Goldilocks customizable select height

A deep dive into CSS sizing patterns for the upcoming customizable `<select>` picker element. The post walks through how to set a 'Goldilocks' height — not too small, not too large — using CSS anchor positioning, `calc-size()`, `stretch`, and `flip-block` fallbacks. It covers cross-browser quirks in Chrome, Firefox, and Safari, providing progressive enhancement strategies using `@supports` and fallback hacks for browsers that don't yet support `calc-size()`. The final copy-pasteable CSS snippet handles viewport margins, minimum height (using `calc-size(fit-content, min(size, ...))`) and maximum height simultaneously.

    #css
Jun 29•8m read time•From jakearchibald.com
Post cover image
Table of contents
Default sizingPrevent the picker from hitting the viewport edgePrevent the picker from getting too smallPrevent the picker from getting too bigPutting it all together
8.9K Impressions2 Comments
Jake Archibald's image
Jake Archibald

JakeArchibald provides insights into web performance optimization and frontend development best prac...

11 Followers

•

101 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard