Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Dark mode flashes white before switching to dark mode


On every page change/swap, despite the dark theme being set as default and in user settings, the page flashes white for a split second before going dark.

It's a bit blinding at night. Is there any way to fix this? Using .net core.

Please see this gif:
https://media0.giphy.com/media/IkREf600hbOlYTjcoR/giphy.gif?cid=790b76115c5c6d5ccbc2fc5580ee1db989278fcd3d637652&rid=giphy.gif&ct=g


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

Unfortunately, we were not able to reproduce this issue in the latest Metronic version.

Did you made any changes in our codebase?

Also, if there is any steps on how we can reproduce it could you please describe them.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Thank you for the reply. I did make some changes but mostly minor (removing menu items, changing logo, etc).

I am more of a backend engineer so if you have any ideas on what I may have broken if anything I would appreciate it.

Could Cloudflare cause such an issue?



Hi,

We are initializing our theme mode inside a script in Views/Partials/ThemeMode/_Init.cshtml, you can compare this file with the file in the latest Metronic version.

Do you have the same issue locally?

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(