Not sure if this is possible with custom CSS, but would there be a way to set a fallback gradient for a header element? Just as I have a header background image with a gradient, so would be useful to replicate the gradient in the CSS when a featured image hasn’t been loaded – I know I can set the fallback image, but a gradient if possible would be ideal.
You could use custom CSS, but it would have to be added before the CSS output by the Element itself, or it would overwrite the Element CSS and the settings wouldn’t work.
I’ve only just realised but this isn’t working as I had hoped, it shows in the inspect CSS rules on the site, but if I remove the background image it doesn’t actually show the gradient – even though I can see the CSS for it there.
If I set the fallback CSS to !important; then it does show but overwrites the element styling/background image – any thoughts?
Just realised what was causing the issue – I still had a background colour on the element header overwriting the snippet CSS, so removing that has fixed it.
I also figured out if I just change the class used in the snippet to a class I’ve added to the header, and then duplicate the snippet with the other gradients, I can get fallback gradients for all the header elements I’ve got π