Dynamic combobox width

Is there a way to have the width of a combobox (and its popup) adjust to the length of the items it’s set to?

I have a dynamic list of items with (potentially) very long names that can’t be broken into multiple lines, and I would like to have a way for the combobox to adjust its width up to a certain amount so that it won’t clip the names of the items in it.
So far I’ve had a small amount of success by setting something like:
vaadin-combo-box::part(input-field) { width: max-content; max-width: 50vw; }
but this just makes it just slightly wider than its standard width, not really accomplishing what I’m aiming for.

Is there a proper way to deal with it or am I just stuck with a catch-all, set width? I am running Vaadin 24.1

I don’t think there is, at least through CSS.
This is a fundamental shortcoming of the <input> element, which is at the core of the ComboBox. It doesn’t really support min-content or max-content.

I suppose you could do something hacky like checking what the longest string in the options is, and set the width based on that e.g. using ex or em units