Skip to content

Commit

Permalink
only set view bottom padding if ha-tabs or paper-tabs are present
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Oct 31, 2024
1 parent a134ddb commit c5ab28a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions src/common/view.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
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;
}

/* Remove bottom footer padding when not present */
.header:not(:has(ha-tabs, paper-tabs)) + #view {
padding-bottom: env(safe-area-inset-bottom) !important;
/* Add bottom footer padding when present */
.header:has(ha-tabs, paper-tabs) + #view {
padding-bottom: calc(
var(--footer-height) + env(safe-area-inset-bottom)
) !important;
}
Loading

0 comments on commit c5ab28a

Please sign in to comment.