Font in Dashboard only visible when in editing mode

I created a new custom theme with a different font in it.
The theme is only selected for the dashboard and not the whole Home Assistant frontend. Somehow I can only see the font when the Dashboard is in editing mode like this:

When I exit the editing mode, the font goes back to default again. Why?

The theme is only applied to the dashboard, not to the whole Home Assistant. But if I apply the theme to the whole Home Assistant, then the font gets displayed correctly.

But I want the theme to only be visible for my dashboard. Any ideas?

Any idea someone?

If you post your theme yaml maybe somebody can help you.

My first guess is a cache issue in the browser. Have you cleared the cache?

1 Like

Of course, here you go:

Code: Kibibit Edit - Pastebin.com
(it’s the kibibit theme which I edited a bit)

Fonts part in theme:

Font CSS

I mean weird thing is, that the font works when I apply the theme to the whole Home Assistant.

If anyone is having this issue in 2025, I found that when using HA 2025.5.1 I had to use the Sections layout and add a new variable to my theme to make it work:

ha-font-family-body: "var(--primary-font-family)"

That way, my dashboards can finally override the font properly when a theme is set on them :smiley:

1 Like

This worked for me thanks! I was losing my mind trying to find the problem :slight_smile:

1 Like