Page Background not working with dark mode

Hi guys,

I have a problem with light/dark mode page background in the browser.

That’s how it is set in Elements

It shows like this in the Elements “preview”
image
image

What is exactly fine.

But in the browser ist shows
A website navigation bar featuring the logo 'flexon', menu options, and an orange 'Learn More' button on the right. (Captioned by AI)
image

Looks like a bug? Or is this happening only on my machine?

Can you share your project via Elements Cloud so I can take a look?

It only needs to include the menu. Then, we’ll look into what’s going on and get it fixed for you :blush:

Oh, I just had a thought… Is this an old project?

The only reason I ask is because I wonder if your Site Template is out of date and missing the following classes from the body tag:

<body class="{{page.bodyClasses}}" {{page.bodyAttributes}}>

1 Like

You are my hero :rofl:

My site template was exactly missing that classes. I copied it in and now it is working.

It is a project I am working since some months to have a kind of template library available where users can copy sections into their project. It is like your core library but with some extensions :grinning_face:

Would you suggest to copy all my content to a new project to prevent some old stuff is still somewhere around?

Thanks for your help!

1 Like