Hi there,
I have the latest version available and my HTML is <html data-theme="dark">
When I clear cache and refresh page I can see the dark theme for approx 0.3 seconds and then the white takes over again.
Please can you help?
This is my HTML:
https://pastebin.com/H7kqGrAW
Thanks
Hi,
Please check the original Metronic template and refer to the Dark Mode init javascript code that initialized the dark mode without the flashes. This code is missing in your template.
<!--begin::Theme mode setup on page load-->
<script>if ( document.documentElement ) { const defaultThemeMode = "system"; const name = document.body.getAttribute("data-kt-name"); let themeMode = localStorage.getItem("kt_" + ( name !== null ? name + "_" : "" ) + "theme_mode_value"); if ( themeMode === null ) { if ( defaultThemeMode === "system" ) { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } else { themeMode = defaultThemeMode; } } document.documentElement.setAttribute("data-theme", themeMode); }</script>
<!--end::Theme mode setup on page load-->
Hi, you don't mention anything about that in here?
https://preview.keenthemes.com/metronic8/demo1/documentation/getting-started/dark-mode.html#quick-setup
Hi,
We will add this info into the documentation in the next update.
But the code was in the template's HTML code on all pages.
Regards.