I want to provide a list which will vary with the input of a text box. This list will provide the results for that search query. I am using amp-list for this.

I want the list height to adjust to the number of results (flex-item should be fine here). But I want the list to have a max height of e.g. 500px and no more

Is this possible? Thank you very much