Default Dark Mode?
Does anyone know how, with the use of a snippet, to make the default/initial setup dark mode?
Paul HopkinsΒ I hope we will be able to set a Default or a System or a Theme Colors Mode in the nearest future. If you use Dark Mode only then as a workaround just switch your color on the light pallete to the Dark colors and Disable the option to switch to real Dark mode.
Adding related link
Mat βΒ thanks for the hack idea :-)
I have found a solution :)
Use this code snippet:
add_action('fluent_community/portal_head', function() {
?>
<?php
});
TjaΕ‘a PeterleΒ sadly, for me, that snippet just prints out document.documentElement.classList.add('dark'); document.documentElement.setAttribute('data-mode', 'dark'); [data-mode=dark] { color-scheme: dark; } at the top of the page.
Paul HopkinsΒ that's weird, it works fine for me... I saw in other thread that you solved this with adding "script" tags correct? π I will just copy paste final code here in case someone will be searching for it:
add_action('fluent_community/portal_head', function() {
?>
<script>
document.documentElement.classList.add('dark'); document.documentElement.setAttribute('data-mode', 'dark'); [data-mode=dark] { color-scheme: dark; }
</script>
<?php
});TjaΕ‘a PeterleΒ it looks like your original post stripped the βscriptβ line. FC needs you to use β/codeβ to keep that in the post. Thanks again!