@@ -19,7 +19,7 @@ import type {
1919 MediaPlayerItem ,
2020 MediaPlayerLayoutType ,
2121} from "../../data/media-player" ;
22- import { haStyleDialog } from "../../resources/styles" ;
22+ import { haStyleDialog , haStyleDialogFixedTop } from "../../resources/styles" ;
2323import type { HomeAssistant } from "../../types" ;
2424import "../ha-dialog" ;
2525import "../ha-dialog-header" ;
@@ -223,30 +223,38 @@ class DialogMediaPlayerBrowse extends LitElement {
223223 static get styles ( ) : CSSResultGroup {
224224 return [
225225 haStyleDialog ,
226+ haStyleDialogFixedTop ,
226227 css `
227228 ha-dialog {
228229 --dialog-z-index : 9 ;
229230 --dialog-content-padding : 0 ;
230231 }
231232
232233 ha-media-player-browse {
233- --media-browser-max-height : calc (100vh - 65px );
234+ --media-browser-max-height : calc (
235+ 100vh - 65px - var (--safe-area-inset-top , 0 ) -
236+ var (--safe-area-inset-bottom , 0 )
237+ );
234238 }
235239
236240 : host (.opened ) ha-media-player-browse {
237- height : calc (100vh - 65px );
241+ height : calc (
242+ 100vh - 65px - var (--safe-area-inset-top , 0 ) -
243+ var (--safe-area-inset-bottom , 0 )
244+ );
238245 }
239246
240247 @media (min-width : 800px ) {
241248 ha-dialog {
242249 --mdc-dialog-max-width : 800px ;
243- --dialog-surface-position : fixed;
244- --dialog-surface-top : 40px ;
245- --mdc-dialog-max-height : calc (100vh - 72px );
250+ --mdc-dialog-max-height : calc (100% - 72px );
246251 }
247252 ha-media-player-browse {
248253 position : initial;
249- --media-browser-max-height : calc (100vh - 145px );
254+ --media-browser-max-height : calc (
255+ 100vh - 145px - var (--safe-area-inset-top , 0 ) -
256+ var (--safe-area-inset-bottom , 0 )
257+ );
250258 width : 700px ;
251259 }
252260 }
0 commit comments