Live data from Hacker News

The element can now be customized with CSS

developer.chrome.com

61–70 of 194 posts

Re: The <select> element can now be customized with CSS

#61
post #46

Some controls are better left unstyled. Look what happened to scrollbars: either they are too thin to grab, have bad color contrast, so it is hard to see what part to actually grab, and, finally, some smartypants have managed even to remove scrollbars altogether from their website. Sure, default select is not the prettiest control, but it gets it job done.

Unfortunately those unusably small or invisible scrollbars are the default in many browsers. Such as Firefox on Linux, which I'm using right now.

I think this really comes down to personal preference. I also use Firefox on Linux and always find the Windows-type scrollbar to be incredibly ugly and bulky, especially on other overflow: scroll elements.

Re: The <select> element can now be customized with CSS

#62

The fact that I'm disproportionally excited about this probably dates me as an early 2000s web developer. But since selects can do things that you simply cannot recreate in HTML, e.g. have options drop downs that extend outside the viewport boundaries, makes this a really helpful feature. Now, do autocompletes and tag selectors next...

with automatic ISO8601 timezone offsets would be awesome too!

Re: The <select> element can now be customized with CSS

#63
post #33

Developers, don't fall for this! This web API scope creep makes it __harder__ to create and maintain truly independent web browsers.. you have to implement more and more and eventually we arrive at the current state of matters - all non-chromium engines are lagging behind. Developers will happily use this, then users will notice websites "look better" in chrome and firefox will become even less relevant. Don't.. you…

> and firefox will become even less relevant No; Firefox can easily afford financially to add this feature. Firefox is already irrelevant; no developer will shed a tear about just blocking Firefox if they refuse to implement. Boycotting won't work either, because boycotts almost never work.

> Firefox is already irrelevant

Did I miss anything?

It’s still not as clumsy and resource intensive (while destroying hardware like disks) like Chrome..

Re: The <select> element can now be customized with CSS

#64
post #34

Earlier quoted context omitted.

"Select multiple" is just a list of checkboxes. The missing part (which is also missing from select) is just the filtering. I am not holding my breath for a decent "select multiple" field. It's been the same crap for decades and browsers could have fixed it long again without waiting for spec - it's just a "replaced element", but they don't care. The fun part is that it looks amazing on Safari iOS (and QED it's rende…

> "Select multiple" is just a list of checkboxes. Not necessarily. I've seen more than one production app with a custom filtering dropdown list of items with checkboxes. I built a couple variants of that in React at my last gig for the company's design system. The keyboard nav was complex... that component is one of the work artifacts that I'm most proud of.

> custom filtering dropdown

I already said that. "Select" is not filterable in the browser already, so `select[multiple]` has no chance of seeing that in this decade.

However you slice/style it, it's just checkboxes (that you can filter/reorder)

Re: The <select> element can now be customized with CSS

#65
post #46

Some controls are better left unstyled. Look what happened to scrollbars: either they are too thin to grab, have bad color contrast, so it is hard to see what part to actually grab, and, finally, some smartypants have managed even to remove scrollbars altogether from their website. Sure, default select is not the prettiest control, but it gets it job done.

This is more about rich HTML for the select options. Being able to select images, rows with two columns of information, extra information in a contrasting font weight, etc. This will be extremely helpful.

Re: The <select> element can now be customized with CSS

#66
post #50

Earlier quoted context omitted.

> basic typeahead It isn’t perfect, but have you tried ? Totally agree about tag pickers, I was bummed to see that Bootstrap didn’t have a tag selector component either.

I have, and failed. See https://news.ycombinator.com/item?id=40265782

Safari is the "new" IE. I put "new" in quotes because it's been this way for like a decade.

Re: The <select> element can now be customized with CSS

#67
post #34
post #28

Earlier quoted context omitted.

I was just wondering how people do a custom now. I guess they make it screen-reader-only and then have aria-hidden checkboxes for everyone else.

"Select multiple" is just a list of checkboxes. The missing part (which is also missing from select) is just the filtering. I am not holding my breath for a decent "select multiple" field. It's been the same crap for decades and browsers could have fixed it long again without waiting for spec - it's just a "replaced element", but they don't care. The fun part is that it looks amazing on Safari iOS (and QED it's rende…

I commented on this a few weeks ago. There are two future components under development that look to support selecting multiple options in a dropdown format.

Search textbox: would be supported under the more customizable Combobox element

Select Multiple: both the Enhanced Select and Combobox plan to support this

Combobox: https://open-ui.org/components/combobox.explainer/

Enhanced Select: https://open-ui.org/components/customizableselect/

Re: The <select> element can now be customized with CSS

#68

The fact that I'm disproportionally excited about this probably dates me as an early 2000s web developer. But since selects can do things that you simply cannot recreate in HTML, e.g. have options drop downs that extend outside the viewport boundaries, makes this a really helpful feature. Now, do autocompletes and tag selectors next...

> Now, do autocompletes

This is kind of ready, see datalist element.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/da...

Re: The <select> element can now be customized with CSS

#69
post #50

Earlier quoted context omitted.

> basic typeahead It isn’t perfect, but have you tried ? Totally agree about tag pickers, I was bummed to see that Bootstrap didn’t have a tag selector component either.

I have, and failed. See https://news.ycombinator.com/item?id=40265782

[deleted]
Post reply on HN