-
Notifications
You must be signed in to change notification settings - Fork 756
Description
As I pointed out in #7542, one often wants to size single-line form controls by contents. Primary use cases are UIs which look like regular content with some parts are editable (e.g. form letters). Here's an example from Google Sheets using select-like controls.
This is currently insanely difficult to do well with native form controls due to things like spinner arrows, date input picker triggers, dropdown arrows etc. It would be nice if we could just do width: fit-content. A lot of the issues with height: max-content that were mentioned in #7542 only apply to textareas and thus shouldn't apply here. Placeholders do still apply, but I don't see why they wouldn't be considered "content", they are shadow DOM descendants. On a regular element shadow DOM descendants absolutely take part in calculating it's intrinsic size. So this should do the right thing for placeholders anyway.
@emilio did some preliminary research on implementability of this in Gecko and said it should be fairly easy to implement (he made a prototype for <select> in 2 minutes and for <input> in another 10!).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
