// lumo-space-m is the margin of the dialog to the viewport
setHeight("calc(100vh - (2*var(--lumo-space-m)))");
setWidth("calc(100vw - (4*var(--lumo-space-m)))");
No need for a theme.
Are there possibly any pitfalls using this approach?
Julien Charpenel:
I am now using the following solution:
On the dialog itself set the size using
// lumo-space-m is the margin of the dialog to the viewport
setHeight("calc(100vh - (2*var(--lumo-space-m)))");
setWidth("calc(100vw - (4*var(--lumo-space-m)))");
No need for a theme.
Are there possibly any pitfalls using this approach?
Julien Charpenel:
I am now using the following solution:
On the dialog itself set the size using
// lumo-space-m is the margin of the dialog to the viewport
setHeight("calc(100vh - (2*var(--lumo-space-m)))");
setWidth("calc(100vw - (4*var(--lumo-space-m)))");
No need for a theme.
Are there possibly any pitfalls using this approach?
If you always need fullsize you’re probably good. Note though that using 100vh on iOS can result in scrollbars due to the way that iOS calculates height.
If you ever need dialogs that have different sizes, eg. 800px under normal circumstances but fullsize when used on snaller screens, you are probably better off with themes as you can rely on media queries to manage size.