Jump to Docs Navigation
Individual fresh CSS features can be amazing, but I always say it’s the most impressive when they go together . Adam Argyle knocked one out of the park with his modestly named Nice Select post & demo . His own post lists all the CSS features that went into it, but I’ll do a quick overview.
The core of it is these are “Custom Selects” meaning a native <select> element with appearance: base-select applied. That unlocks the ability to essentially style any part of it any way you want. (By the way, multi-selects are very close now too.)
The opened menu is positioned with anchor positioning and have great edge-detection fallbacks.
The menus animate both opening and closing thanks to @starting-style and allow-discrete transitions.
The scrolling menus have slightly customized scrollbar styles and a subtle animation where the fade in from the edges via a view() style scroll-driven animation.
Logical properties, color schemes, and user preferences are used so users needs are taken into…