Hi guys! I’m tring to create the random quote machine. i wrote this code but there is a problem: the background color doesn’t change. I tried different solutions but in the end i didn’t solve the problem. Some one can hepls me?
p.s.
Is the first time that i upload something on GitHub, i hope to didn’t commit some mistakes
Yeah, I gave it a quick try and wasn’t able to get it to work.
No, I don’t think you can get that variable into the Sass file. But you can use it as an inline style. There is a way to do it, but it may take some minor restructuring.
Put a container for the background color and move the centering to it (remove flexbox from body). You can of course create a class for it but I just added the styles to the style object.
I’m sure there are a bunch of other ways of doing it. Another way is using custom properties. It does require you to interact with the DOM directly but I don’t think that is much of an issue in this case.