Story Details

  • The <select> element can now be customized with CSS

    Posted: 2025-03-31 09:11:47

    The <select> element, long a styling holdout, is finally getting much-needed CSS customization capabilities in Chromium-based browsers. Developers can now style aspects like the dropdown arrow (using appearance: none and pseudo-elements), open state, and even the listbox itself, offering greater control over its visual presentation. This enables better integration with overall site design and improved user experience without resorting to JavaScript workarounds or custom elements. While some pseudo-elements are browser-prefixed, the changes pave the way for more consistently styled and accessible dropdown menus across the web.

    Summary of Comments ( 42 )
    https://news.ycombinator.com/item?id=43532830

    Hacker News users generally expressed cautious optimism about the ability to finally style <select> elements with CSS. Several pointed out that this has been a long-requested feature and lamented the previous difficulty in customizing dropdowns. Some praised the detailed explanation in the blog post, while others worried about browser compatibility and the potential for inconsistencies across different implementations. A few users discussed specific styling challenges they'd encountered, like styling the dropdown arrow or achieving consistent behavior across operating systems. There was some concern about the potential for developers to create confusing or inaccessible custom selects, but also acknowledgment that the feature offers powerful new design possibilities.