Dark/Light Mode Toggle

Thank you for your help
I am using this Dark/Light Mode Toggle component

My question is about detecting which mode I am in and switch the background image so I can have one image for light mode and another for dark mode.

I tried to follow along with the link you posted and also this one

which goes into a little more detail but I did not succeed. I tried adding image files(JPGs) $bg-light and $bg-dark to my theme


I also tried adding a color_definitions.scss stylesheet to my theme with the code in that post

$bg: url(dark-light-choose($bg-light, $bg-dark));

:root {
  --custom-bg: #{$bg};
}

I also tried creating a theme on github

like I said, sorry about being a little lost
If I should start a new topic let me know and in what category to put it
Thanks for your help

1 Like