I cannot seem to get the lovelace theme background-image to stay fixed so that it does not scroll with the page. If the page is longer than the screen the picture either stretches to the full length and scrolls or ends at the bottom and disappears when scrolling further down if I do not use the repeat option (depending on which settings I use). I cannot get the background image to be fixed when scrolling.
If I understand it correctly I should be able to use these properties: scroll | fixed | local
None of them make any difference.
This is the code I find in the docs everywhere and use:
Found a solution! You can use Thomas Loven’s Card-Mod 2.0, and use this in your template, also make sure to define card-mod-theme: theme name in your themes yaml:
Thanks, I tried that and I thought it fixed it at first but that was not the case for me. When the view was longer than the background picture the picture was repeated again and the background still scrolls with the view.
After a lot of trying around, researching and frustration, I finally found a way to fix iOS’ webkit behavior I only did some quick testing so far, so please let me know if there is anything wrong or weird.
Step 1: Create a css file: /hacsfiles/dashboard_resources/background-fix.css
So this solution is the only one I’ve found that actually makes the background stick on an iOS device. The problem is though that once I set it using a created .css file I can’t seem to get rid of it other than deleting the .css file as a resource. I’ve cleared my cache, I’ve closed all my apps etc etc but so far no go. So if I try to switch between light and dark theme I can kinda forget about it.