After updating to Home Assistant Core 2026.8, my custom theme stopped hiding the header.
The original theme had been working for several years using:
card-mod-root-yaml:
together with:
--header-height: 0px;
}```
After the update, the header was still visible and the camera dashboard no longer moved to the top of the screen.
---
## Cause
There were actually two different issues:
1. `card-mod-root-yaml` was no longer applying the CSS correctly in my setup.
2. Home Assistant now reserves the header space using `padding-top` on `hui-view-container#view`.
---
## Working solution
Replacing
```card-mod-root-yaml:```
with
```card-mod-root:```
and adding
```hui-view-container#view {
padding-top: 0px !important;
}```
restores the old behaviour.
Example:
blue_night:
card-mod-theme: blue_night
card-mod-root: |
hui-view-container#view {
min-height: 100vh !important;
padding-top: 0px !important;
}
.header {
opacity: 0;
transition:
opacity 0.25s ease-in-out,
transform 0.25s ease-in-out !important;
transform: translateY(-60%);
position: fixed;
{% if user == 'Robert' or user == 'Admin' %}
display: block;
{% else %}
display: none;
{% endif %}
}
.header .toolbar {
pointer-events: none;
}
.header:hover {
opacity: 1;
transform: translateY(0%);
}
.header:hover .toolbar {
pointer-events: all;
}```
Another thing I discovered during debugging:
If you use
themes: !include_dir_merge_named themes
do not leave backup files like:
blue_night - copy.yaml
inside the same themes directory.
Home Assistant loads every YAML file from that folder, which may override or merge your active theme and make debugging extremely confusing.
Hopefully this saves someone else several hours of debugging.
Tested with
* Home Assistant Core 2026.8.x
* Home Assistant OS 18.2
* card-mod 4.2.1
* HACS
“card-mod-root-yaml no longer applies the expected root styles after upgrading to Home Assistant Core 2026.8, while card-mod-root continues to work correctly.”