Hi, does anyone have a solution for this problem? When using the built-in elevation CSS classes on a white or lighter background, they work fine, but when switching to a dark theme, they become invisible.
What can be done to make these visible on the dark theme?
This is a known issue with the f7 elevation classes. They define the box-shadow css style with only a black shadow (e.g., rgba (0, 0, 0, 0.2)). So, on light themes that’s a great shadow but on a black background it does almost nothing.
If you want the box shadow to change color with the theme, you’re going to have to manipulate the f7 css variable that corresponds to the elevation number (e.g., --f7-elevation-5) manually.
In the style object of the component you want to modify (or just the top component of any widget) you’ll want to add something like this: