ITADN

[css-forms-1] Should `select:not(:open)::picker(select)` use `display: none !important`?

#14061OpenLeaVerou 创建于 2026-06-17
css-forms-1
L
LeaVeroucommented
Currently there is a footgun where if authors need to remember to use `:open` if they want to set a different `display` value on a customizable select, otherwise the select is always open, just laid out badly ([testcase](https://codepen.io/leaverou/pen/RNojvPZ)) Are there any use cases for having a `display` value other than `none` on pickers of closed selects? Now that we can animate from `display: none`, I can't think of any. If not, I propose adding this to the UA stylesheet: ```css select:not(:open)::picker(select) { display: none !important; } ``` This does not appear to negatively affect listbox selects, since they have no picker.
0 条评论