Skip to content

Commit

Permalink
remove footer-height and make any references to it directly calculate…
Browse files Browse the repository at this point in the history
… it from header-height instead, to work add-ons like kiosk mode that hide the header toolbar
  • Loading branch information
Nerwyn committed Nov 9, 2024
1 parent 0aad431 commit ce8d96b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/common/ha_fab.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Fix add card button position */
:host {
bottom: calc(var(--footer-height) + 16px) !important;
bottom: calc(var(--header-height) / 0.6 + 16px) !important;
z-index: 3 !important;
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ha-tabs {
top: unset !important;
bottom: 0 !important;
background: var(--navbar-background) !important;
height: var(--footer-height) !important;
height: calc(var(--header-height) / 0.6) !important;
width: calc(100% - var(--mdc-drawer-width, 0px));
padding-bottom: env(safe-area-inset-bottom) !important;
margin: 0 !important;
Expand Down
3 changes: 1 addition & 2 deletions src/common/view.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* Add padding to sides of viewbox and force background color just in case */
#view {
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;
background: var(--view-background, var(--lovelace-background)) !important;
Expand All @@ -9,6 +8,6 @@
/* Add bottom footer padding when present */
.header:has(ha-tabs, paper-tabs) + #view {
padding-bottom: calc(
var(--footer-height) + env(safe-area-inset-bottom)
calc(var(--header-height) / 0.6) + env(safe-area-inset-bottom)
) !important;
}
1 change: 0 additions & 1 deletion src/material_rounded/theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Material Rounded:
# Toolbar
paper-slider-height: 4px
header-height: 48px
footer-height: 80px
mdc-top-app-bar-fixed-box-shadow: none
app-header-background-color: var(--lovelace-background)
app-header-text-color: var(--primary-text-color)
Expand Down
Loading

0 comments on commit ce8d96b

Please sign in to comment.