thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.06k stars 169 forks source link

HA 2023.4 Hide header not working #271

Closed Salsalove closed 6 months ago

Salsalove commented 1 year ago

My Home Assistant version: 2023.4

What I am doing: I updated to HA 2023.4

What I expected to happen:

What happened instead:

Minimal steps to reproduce:

# The least amount of code possible to reproduce my error

# End of code

Error messages from the browser console:


By putting an X in the boxes ([]) below, I indicate that I:

Pirol62 commented 1 year ago

card-mod-theme: night_mobile card-mod-root: | app-header { display: none; } ha-button-menu { display: none; }

this does not work anymore. Very bad for my alarm clock dashboard Would like to read, if there is any activity on this.

ildar170975 commented 1 year ago

Has anyone checked a presence of a styled element in DOM? Probably this element does NOT exist anymore. Seems that people just took some theme from Internet without having any idea how it is supposed to be used; and when some element was removed from DOM - these people started complaining “wtf this style does not work” and then create issues on Github. Not a smart behavior.

Pirol62 commented 1 year ago

@ildar170975 ?? If you replied on my post: Where could I have recognized the breaking change?

I knew very well what we've done. But that way is maybe not available anymore. Ok, but what could be an alternate solution? Any ideas?

Pirol62 commented 1 year ago

solved it by replacing app-header with .header:

card-mod-root: | .header { display: none; }

This issue can be closed

ps: the code above unfortunately only hides the tabs not the complete header. There seem to be no css based solution so far. I installed the kiosk mode component and solved it this way. Was quickly done.

ildar170975 commented 1 year ago

@Pirol62 Sorry if I offended you , have no intention to insult you. The main thing I want to express is - we cannot use solutions mindlessly , we always have to check ourselves first; DOM structure is NOT a breaking change (from a point of view of HA dev team), it changes from time to time (and every time I have to update my tutorials in the Community); so when something stops working - we should check if a solution is still applicable to a possibly changed DOM.