Shopify themes, liquid, logos, and UX
I make a new stylesheet in the Assets category:
"zz-mode-example.css"
I need to point to this stylesheet with href here:
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-example.css" />
what do I put in href="_____________________"
-----------
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-dark.css" />
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-light.css" />
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-brown.css" />
<script>
function toggleTheme(value) {
sheets[0].href = value;
}
</script>
<body>
<button class="mode-dark-button" onclick="toggleTheme('zz-mode-dark.css')">
Dark
</button>
<button class="mode-light-button" onclick="toggleTheme('zz-mode-light.css')">
Light
</button>
<button class="mode-brown-button" onclick="toggleTheme('zz-mode-brown.css')">
Brown
</button>
</body>
Hi @Mirokuwu,
If you want to get CSS file in Assets you can use following code:
<link id="theme" rel="stylesheet" type="text/css" href="{{ 'zz-mode-example.css' | asset_url }}" />
Hope it helps!
Hi Mirokuwu,
NightTheme makes it easy to add dark mode to your Shopify store, keeping customers engaged even in low light.
Why Choose NightTheme?
🚀 Don’t miss out—install NightTheme today and enhance your customers’ shopping experience! 🔗 Try it now!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025