@@ -1055,11 +1055,13 @@ export class IAComboBox extends LitElement {
10551055 const usableHeightAbove = mainWidgetRect . top ;
10561056 const usableHeightBelow = innerHeight - mainWidgetRect . bottom ;
10571057
1058+ const maxHeightVar = `var(--combo-box-list-max-height--)` ;
1059+
10581060 const optionsListStyles : Record < string , string > = {
10591061 top : `${ mainWidgetRect . bottom + scrollY } px` ,
10601062 left : `${ mainWidgetRect . left + scrollX } px` ,
10611063 width : `var(--combo-box-list-width--, ${ mainWidgetRect . width } px)` ,
1062- maxHeight : `${ usableHeightBelow } px` ,
1064+ maxHeight : `min( ${ maxHeightVar } , ${ usableHeightBelow } px) ` ,
10631065 } ;
10641066
10651067 Object . assign ( optionsList . style , optionsListStyles ) ;
@@ -1072,7 +1074,7 @@ export class IAComboBox extends LitElement {
10721074 if ( overflowingViewport && moreSpaceAbove ) {
10731075 optionsList . style . top = 'auto' ;
10741076 optionsList . style . bottom = `${ innerHeight - mainWidgetRect . top - scrollY } px` ;
1075- optionsList . style . maxHeight = `${ usableHeightAbove } px` ;
1077+ optionsList . style . maxHeight = `min( ${ maxHeightVar } , ${ usableHeightAbove } px) ` ;
10761078 }
10771079 } , 0 ) ;
10781080 }
@@ -1212,7 +1214,7 @@ export class IAComboBox extends LitElement {
12121214 - - combo- box- width- - : var(--combo-box-width );
12131215 - - combo- box- padding- - : var(- - padding- sm);
12141216 - - combo- box- lis t- width- - : var(- - combo- box- lis t- width, unset );
1215- - - combo- box- lis t- height- - : var(- - combo- box- lis t- height, 250px);
1217+ - - combo- box- lis t- max - height- - : var(- - combo- box- lis t- max - height, 250px);
12161218 }
12171219
12181220 # container {
@@ -1303,7 +1305,6 @@ export class IAComboBox extends LitElement {
13031305 padding : 0 ;
13041306 background : white;
13051307 width : var (--combo-box-list-width-- );
1306- height : var (--combo-box-list-height-- );
13071308 max-height : 400px ;
13081309 box-shadow : 0 0 1px 1px # ddd ;
13091310 opacity : 0 ;
0 commit comments