<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dark mode — is it possible?]]></title><description><![CDATA[<p dir="auto"><a href="https://codepen.io/HarlemSquirrel/pen/NdMebZ?fbclid=IwAR0yShgdR6YdQZ54H1N3wEeb1gNW_LNh_cDVeBTFn6xWcZdQ8clO7AxaT80" target="_blank" rel="noopener noreferrer nofollow ugc">https://codepen.io/HarlemSquirrel/pen/NdMebZ?fbclid=IwAR0yShgdR6YdQZ54H1N3wEeb1gNW_LNh_cDVeBTFn6xWcZdQ8clO7AxaT80</a></p>
<p dir="auto">would it be possible to implement something like this?</p>
]]></description><link>https://laythemeforum.com/topic/3802/dark-mode-is-it-possible</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 06:57:44 GMT</lastBuildDate><atom:link href="https://laythemeforum.com/topic/3802.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Nov 2018 13:51:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dark mode — is it possible? on Sun, 12 Nov 2023 21:25:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jacobtegel">@<bdi>jacobtegel</bdi></a> let me know, when you find out, would like to know as well!</p>
]]></description><link>https://laythemeforum.com/post/36324</link><guid isPermaLink="true">https://laythemeforum.com/post/36324</guid><dc:creator><![CDATA[Hayo Gebauer]]></dc:creator><pubDate>Sun, 12 Nov 2023 21:25:32 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Sun, 12 Nov 2023 21:20:02 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/mariusjopen">@<bdi>mariusjopen</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a> thank you so much for your work on this topic!<br />
i recently came across it and immediately tried to implement it on my site. I tried adding the darkmode button .clickme class ( i used .dark-mode-wrapper class) to an empty menu item and it would not fire the event, while an empty link on the site would fire it.<br />
Any idea why that is or how to work around it? I would like to have the toggle button inside the menu permanently accessible.</p>
<p dir="auto"><a href="https://jacobtegel.com/home-copy-2/" target="_blank" rel="noopener noreferrer nofollow ugc">https://jacobtegel.com/home-copy-2/</a></p>
<p dir="auto">Thank you so much in advance!<br />
Jacob</p>
]]></description><link>https://laythemeforum.com/post/36323</link><guid isPermaLink="true">https://laythemeforum.com/post/36323</guid><dc:creator><![CDATA[jacobtegel]]></dc:creator><pubDate>Sun, 12 Nov 2023 21:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Mon, 31 Jul 2023 12:13:18 GMT]]></title><description><![CDATA[<p dir="auto">Alright after some tests i've found the solution to have the dark/light mode synchronised.</p>
<pre><code>&lt;!-- Darkmode Code --&gt;
&lt;script&gt;

if (window.matchMedia &amp;&amp; window.matchMedia("(prefers-color-scheme: dark)").matches){
    jQuery("body").addClass("dark-mode-on");
}
window
	.matchMedia("(prefers-color-scheme: dark)")
	.addEventListener("change", function (e) {
		const colorScheme = e.matches ? "dark" : "light";
		console.log(colorScheme);

		if (colorScheme === "dark") {
		    jQuery("body").addClass("dark-mode-on");
		} else {
		    jQuery("body").removeClass("dark-mode-on");
		}
	});
&lt;/script&gt;
</code></pre>
]]></description><link>https://laythemeforum.com/post/34840</link><guid isPermaLink="true">https://laythemeforum.com/post/34840</guid><dc:creator><![CDATA[Keffer]]></dc:creator><pubDate>Mon, 31 Jul 2023 12:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Sat, 29 Jul 2023 15:28:41 GMT]]></title><description><![CDATA[<p dir="auto">I'm lost trying to put this in motion so a last question :</p>
<p dir="auto">I would love to add the dark mode in automatic mode in your code, when the system is changing, the website is changing too, without having to refresh.</p>
<p dir="auto">The example :<br />
<a href="https://codepen.io/daelity/pen/zgNdZj" target="_blank" rel="noopener noreferrer nofollow ugc">https://codepen.io/daelity/pen/zgNdZj</a><br />
<a href="https://stackoverflow.com/questions/56393880/how-do-i-detect-dark-mode-using-javascript" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/56393880/how-do-i-detect-dark-mode-using-javascript</a><br />
<a href="https://www.section.io/engineering-education/watch-for-system-dark-mode-using-js-css/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.section.io/engineering-education/watch-for-system-dark-mode-using-js-css/</a></p>
<p dir="auto">Thank you anyone for the help.</p>
]]></description><link>https://laythemeforum.com/post/34839</link><guid isPermaLink="true">https://laythemeforum.com/post/34839</guid><dc:creator><![CDATA[Keffer]]></dc:creator><pubDate>Sat, 29 Jul 2023 15:28:41 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Mon, 24 Jul 2023 11:47:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a></p>
<p dir="auto">Thank you so much for this.</p>
]]></description><link>https://laythemeforum.com/post/34744</link><guid isPermaLink="true">https://laythemeforum.com/post/34744</guid><dc:creator><![CDATA[Keffer]]></dc:creator><pubDate>Mon, 24 Jul 2023 11:47:46 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Mon, 24 Jul 2023 07:34:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/keffer">@<bdi>Keffer</bdi></a></p>
<p dir="auto">This part is the darkmode code, first part of determines, that the website choses darrkmode, if the user has darkmode activated in their OS. (I put this part in Custom HTML at bottom)</p>
<pre><code>&lt;!-- Darkmode Code --&gt;
&lt;script&gt;if (window.matchMedia &amp;&amp; window.matchMedia("(prefers-color-scheme: dark)").matches){jQuery("body").addClass("dark-mode-on");}
window.laytheme.on("newpage", function(layoutObj, type, obj){
 
});
window.laytheme.on("newpage", function(layoutObj, type, obj){
jQuery( "li#menu-item-3845" ).html( '&lt;div class="dark-mode-wrapper"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" id="darkmode" fill="currentColor" stroke="currentColor" stroke-width="1.2" viewBox="0 0 14.5 14.5"&gt;&lt;defs&gt;&lt;style&gt;.cls-3{fill:none;}.cls-4{stroke:none}svg#darkmode {overflow: hidden;}&lt;/style&gt;&lt;/defs&gt;&lt;title&gt;DARKMODE&lt;/title&gt;&lt;g id="Layer_2" data-name="Layer 2"&gt;&lt;g id="Layer_1-2" data-name="Layer 1"&gt;&lt;circle class="cls-3" cx="7.25" cy="7.25" r="6.75"/&gt;&lt;path class="cls-4" d="M14,7.25a6.71,6.71,0,0,0-2.22-5L2.26,11.78A6.74,6.74,0,0,0,14,7.25Z"/&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&lt;/div&gt;');
});
jQuery(document).on("click", ".dark-mode-wrapper", function(event) {
jQuery("body").toggleClass("dark-mode-on");
});
&lt;/script&gt;
</code></pre>
<p dir="auto">Now you need to adjust your CSS classes like this:</p>
<pre><code>.dark-mode-on {background-color: #000!important}
</code></pre>
<p dir="auto">Go through everything until you have a complete darkmode. The darkmode button can be placed by giving a text or image the class:<br />
<strong>dark-mode-wrapper</strong></p>
]]></description><link>https://laythemeforum.com/post/34741</link><guid isPermaLink="true">https://laythemeforum.com/post/34741</guid><dc:creator><![CDATA[Hayo Gebauer]]></dc:creator><pubDate>Mon, 24 Jul 2023 07:34:38 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Fri, 21 Jul 2023 12:48:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a></p>
<p dir="auto">By any chance can you give the code you used for your website ?</p>
<p dir="auto">Trying to get there but i'm not a code pro ...</p>
]]></description><link>https://laythemeforum.com/post/34734</link><guid isPermaLink="true">https://laythemeforum.com/post/34734</guid><dc:creator><![CDATA[Keffer]]></dc:creator><pubDate>Fri, 21 Jul 2023 12:48:36 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Wed, 12 Aug 2020 20:02:20 GMT]]></title><description><![CDATA[<p dir="auto">Dear @fr</p>
<p dir="auto">Awesome! :)</p>
<p dir="auto">This is great for people in the future too</p>
<p dir="auto">Thank you sincerely &amp; for using Lay Theme<br />
Richard</p>
]]></description><link>https://laythemeforum.com/post/21092</link><guid isPermaLink="true">https://laythemeforum.com/post/21092</guid><dc:creator><![CDATA[Richard]]></dc:creator><pubDate>Wed, 12 Aug 2020 20:02:20 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Mon, 10 Aug 2020 15:17:07 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, it worked!!<br />
@fr</p>
]]></description><link>https://laythemeforum.com/post/21052</link><guid isPermaLink="true">https://laythemeforum.com/post/21052</guid><dc:creator><![CDATA[Hayo Gebauer]]></dc:creator><pubDate>Mon, 10 Aug 2020 15:17:07 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Mon, 10 Aug 2020 13:47:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a></p>
<p dir="auto">.nav.mobile-nav</p>
<p dir="auto">You have to tell the dark mode button to toggle the background of this css property to black.</p>
]]></description><link>https://laythemeforum.com/post/21050</link><guid isPermaLink="true">https://laythemeforum.com/post/21050</guid><dc:creator><![CDATA[felix_rabe]]></dc:creator><pubDate>Mon, 10 Aug 2020 13:47:37 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Thu, 06 Aug 2020 19:49:49 GMT]]></title><description><![CDATA[<p dir="auto">After another go and mostly with the help of a friend, I made it work!<br />
There's just one small issue left, on mobile in darkmode if you cancel the menu or go to any link in the menu, the background lights up white, anyway to keep it dark?</p>
<p dir="auto"><a href="http://www.hayogebauer.com" target="_blank" rel="noopener noreferrer nofollow ugc">www.hayogebauer.com</a> (issue only on mobile version)</p>
]]></description><link>https://laythemeforum.com/post/21006</link><guid isPermaLink="true">https://laythemeforum.com/post/21006</guid><dc:creator><![CDATA[Hayo Gebauer]]></dc:creator><pubDate>Thu, 06 Aug 2020 19:49:49 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Thu, 23 Apr 2020 10:56:42 GMT]]></title><description><![CDATA[<p dir="auto">please create a new topic for your new issue</p>
<p dir="auto">make sure u have updated lay theme and all of your lay theme addons</p>
<p dir="auto">u can only update lay theme if u have entered the license key</p>
<p dir="auto">then make sure if you use any caching plugin to clear the cache or disable the caching plugin</p>
]]></description><link>https://laythemeforum.com/post/18607</link><guid isPermaLink="true">https://laythemeforum.com/post/18607</guid><dc:creator><![CDATA[arminunruh]]></dc:creator><pubDate>Thu, 23 Apr 2020 10:56:42 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Wed, 22 Apr 2020 13:59:06 GMT]]></title><description><![CDATA[<p dir="auto">On page load I am getting this error "Failed to load resource: [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (backbone.radio.min.js.map, line 0)</p>
<p dir="auto">What can cause this?</p>
<p dir="auto">And if I use the code and click the toggle link it produces the error "[Error] TypeError: undefined is not an object (evaluating 'jQuery(t).offset().top')<br />
(anonymous function) (frontend.app.min.js:1:60885)<br />
dispatch (jquery.js:3:12375)<br />
(anonymous function) (jquery.js:3:9094)"</p>
<p dir="auto">weird.</p>
]]></description><link>https://laythemeforum.com/post/18555</link><guid isPermaLink="true">https://laythemeforum.com/post/18555</guid><dc:creator><![CDATA[thomasmaier]]></dc:creator><pubDate>Wed, 22 Apr 2020 13:59:06 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Wed, 06 Nov 2019 09:30:26 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a></p>
<p dir="auto">Have a look here:</p>
<pre><code>jQuery(document).on("click", ".clickme", function(event) {
jQuery("body").toogleClass("dark-mode-on");
});
</code></pre>
<p dir="auto">This toggles a class called "dark-mode-on" in the top of your page.</p>
<p dir="auto">You can then use CSS with children elements to make the change. For example:</p>
<pre><code>.dark-mode-on .site-title {
color: red;
}

.dark-mode-on ._Default {
background-color: yellow;
}
</code></pre>
<p dir="auto">Just to give you a rough idea…</p>
<p dir="auto">Hope that helps!</p>
<p dir="auto">Best!</p>
<p dir="auto">Marius</p>
]]></description><link>https://laythemeforum.com/post/15797</link><guid isPermaLink="true">https://laythemeforum.com/post/15797</guid><dc:creator><![CDATA[mariusjopen]]></dc:creator><pubDate>Wed, 06 Nov 2019 09:30:26 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Tue, 05 Nov 2019 10:24:29 GMT]]></title><description><![CDATA[<p dir="auto">Anyone here maybe, who can help me with this code?<br />
I tried finding out on the net, don't have the time to do the codearmy tutorial currently...</p>
]]></description><link>https://laythemeforum.com/post/15778</link><guid isPermaLink="true">https://laythemeforum.com/post/15778</guid><dc:creator><![CDATA[Hayo Gebauer]]></dc:creator><pubDate>Tue, 05 Nov 2019 10:24:29 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Mon, 12 Nov 2018 12:47:44 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a><br />
lovely!</p>
<p dir="auto">Well done!</p>
<p dir="auto">I think the best is if you make a quick, free tutorial about Javascript or jQuery on Codeacademy.<br />
Then you will know everything you need.</p>
<p dir="auto">Best!</p>
<p dir="auto">Marius</p>
]]></description><link>https://laythemeforum.com/post/11480</link><guid isPermaLink="true">https://laythemeforum.com/post/11480</guid><dc:creator><![CDATA[mariusjopen]]></dc:creator><pubDate>Mon, 12 Nov 2018 12:47:44 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Sat, 10 Nov 2018 12:59:43 GMT]]></title><description><![CDATA[<p dir="auto">thanks for the advice, I'm not familiar with jQuery but managed to make this:</p>
<p dir="auto"><a href="http://hayogebauer.com/lel" target="_blank" rel="noopener noreferrer nofollow ugc">hayogebauer.com/lel</a></p>
<p dir="auto">using this:<br />
&lt;script&gt;<br />
jQuery(document).on("click", ".clickme", function(event) {<br />
jQuery("nav.primary").css("color", "#fff");<br />
jQuery("._Default").css("color", "#fff");<br />
jQuery("._Small").css("color", "#fff");<br />
jQuery("._Caption").css("color", "#fff");<br />
jQuery("body").css("background-color", "#0a0a0a");<br />
});<br />
&lt;/script&gt;</p>
<p dir="auto">still buggy though, I think I have the wrong selectors? also it doenst switch back to light mode on click and doesnt last on refresh, any tipps?</p>
]]></description><link>https://laythemeforum.com/post/11471</link><guid isPermaLink="true">https://laythemeforum.com/post/11471</guid><dc:creator><![CDATA[Hayo Gebauer]]></dc:creator><pubDate>Sat, 10 Nov 2018 12:59:43 GMT</pubDate></item><item><title><![CDATA[Reply to Dark mode — is it possible? on Thu, 08 Nov 2018 10:14:16 GMT]]></title><description><![CDATA[<p dir="auto">Dear <a class="plugin-mentions-user plugin-mentions-a" href="/user/hayo-gebauer">@<bdi>Hayo-Gebauer</bdi></a><br />
well, you might use this code to achieve exactly this.</p>
<p dir="auto">To implement it have a look here:<br />
<a href="http://laytheme.com/documentation.html#custom-javascript" target="_blank" rel="noopener noreferrer nofollow ugc">http://laytheme.com/documentation.html#custom-javascript</a></p>
<p dir="auto">Best!</p>
<p dir="auto">Marius</p>
]]></description><link>https://laythemeforum.com/post/11450</link><guid isPermaLink="true">https://laythemeforum.com/post/11450</guid><dc:creator><![CDATA[mariusjopen]]></dc:creator><pubDate>Thu, 08 Nov 2018 10:14:16 GMT</pubDate></item></channel></rss>