Sizing a popup window

I have a popup window in which I want to display any (own) page.
This already works very well, but I'm having problems with the size of the window.

My first attempt was to work with absolute sizes. But that doesn't work with the content. This is exclusively dynamic with HTML template and CSS.

Now I'm trying to design the popup window with HTML.

My concern is:
I call the popup with a fixed width or let it calculate to 90% of the browser window.
The height must be calculated automatically. Depending on the content.

Here is my code for the popup window:

procedure CallPopup( ATitel: String; ABreite, AHoehe: Integer;AFrameClass: TWebBasisFormClass; AParam: TJSArray;
                     APopupResultProc: TPopupResultProc); overload;
var
  Popup: TWebPopupForm;
begin
  Popup := TWebPopupForm.CreateNew( procedure( AForm: TObject)
           begin
             (AForm as TWebPopupForm).FFrame := AFrameClass.CreateNew( 'divFrame', procedure( AForm: TObject)
             begin
               TWebBasisForm( AForm).Init( AParam);
             end);
           end);

  Popup.Caption := ATitel;
  Popup.Popup   := True;
  Popup.Border  := fbDialogSizeable;

  if ABreite < 0 then begin
    asm
      ABreite = window.innerWidth;
    end;
    ABreite := round(ABreite * 0.9);
  end;

  // ??????????????
  if AHoehe < 0 then begin
    Popup.ElementPosition := epRelative;       // ??????????????
  end;

  Popup.Width   := ABreite;
  Popup.Height  := AHoehe;    // ??????????????

  window.location.hash := 'subform';

  Popup.ShowModal( procedure( AValue: TModalResult)
                   begin
                     if AValue = mrOk then
                       APopupResultProc( Popup.PopupResult);
                   end
                 );
end;

The HTML-Code is not ready:

        <div class="container-fluid">

          <div class="row">
            <div class="col-12"><div id="divFrame"></div></div>
            <div class="col-10"></div>
            <div class="col-1"><a id="aAbbrechen">Abbrechen</a></div>
            <div class="col-1"><button id="btnUebernehmen">Übernehmen</button></div>
          </div>
        </div>

Can somebody help me

Did you try to set Popup.HeightStyle := ssAuto?

The TWebForm form has no "HeightStyle". Or is there a special popup form?
I used the “Multiform” demo as a basis.

The way I set the width doesn't work either. Only if I set the width in "dfm" will the shape be displayed as set.
Since we use a lot of external HTML code, our web designer suggested doing everything with Bootstrap/Modal. I'll take a look at it.

HeightStyle should be accessible as public property.

No, not in a TWebForm.
But I now use a fully bootstrap based approach. This is also a bit easier for our web designer.