Wild how far you can push "customizable select" with just #CSS nerdy.dev/nice-select
Post
@nerdy.dev Looks lovely, I’m doing something similar atm. But I’m stuck with wanting to ”remote closing” the menu via JS also. Is there something similar to showPicker - but inverted - coming, do you know? Like hidePicker()
@nerdy.dev Another thing: I notice you use `fieldset` instead of `optgroup`, is that because styleability? I have had a hard time styling my optgroups.. but kept them becuase semantics, I guess.
I thought it was optgroup + legend? codepen.io/editor/lukew... - this seems to work?
So if you set the label attribute on optgroup and give it the legend, then in older browsers it will fallback more gracefully (using the label attribute). Because optgroup would be preserved, fieldset wouldn't be. optgroup is also semantically more correct.
0 reposts0 likes