Skip to content

Commit 8885f6b

Browse files
committed
Add safe areas to 2 pane fixed
1 parent 62df70f commit 8885f6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/ha-two-pane-top-app-bar-fixed.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export class TopAppBarBaseBase extends BaseElement {
3232

3333
protected _scrollTarget!: HTMLElement | Window;
3434

35+
@property({ type: Boolean, reflect: true }) public narrow = false;
36+
3537
@property({ attribute: "center-title", type: Boolean }) centerTitle = false;
3638

3739
@property({ type: Boolean, reflect: true }) prominent = false;
@@ -255,6 +257,11 @@ export class TopAppBarBaseBase extends BaseElement {
255257
padding-top: calc(
256258
var(--header-height) + var(--safe-area-inset-top, 0px)
257259
);
260+
padding-bottom: var(--safe-area-inset-bottom);
261+
padding-right: var(--safe-area-inset-right);
262+
}
263+
:host([narrow]) .mdc-top-app-bar--fixed-adjust {
264+
padding-left: var(--safe-area-inset-left);
258265
}
259266
.shadow-container {
260267
position: absolute;

0 commit comments

Comments
 (0)