Skip to content

Commit

Permalink
add safe area inset padding to view and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Aug 14, 2024
1 parent d659bed commit 832fc99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ha-tabs {
background: var(--navbar-background) !important;
height: var(--footer-height) !important;
width: calc(100% - var(--mdc-drawer-width, 0px));
padding: 0 !important;
padding-bottom: env(safe-area-inset-bottom) !important;
margin: 0 !important;
margin-inline: 0 !important;
}
Expand Down
7 changes: 6 additions & 1 deletion src/common/view.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* Add padding to sides of viewbox and force background color just in case */
#view {
padding: 40px 12px var(--footer-height) !important;
padding-top: calc(40px + env(safe-area-inset-top)) !important;
padding-left: calc(12px + env(safe-area-inset-left)) !important;
padding-right: calc(12px + env(safe-area-inset-right)) !important;
padding-bottom: calc(
var(--footer-height) + env(safe-area-inset-bottom)
) !important;
background: var(--lovelace-background) !important;
}
Loading

0 comments on commit 832fc99

Please sign in to comment.