Neocities.org

Solaria's Webspace

solaria.neocities.org

732,119 views
555 followers
24,521 updates
0 tips
hi, i saw your dark/light theme tutorial and it was very useful!! (going to add to my list of resources when i can) i note that you said "have to be defined as a valid color" about variables - not to ask a question thats probably obvious, but is there a way to make a var for a background image? i know the @media would probably work in this case but im just curious really. once again thank you so much for the guide !!
3 likes
owthehedge 3 months ago

ive been wanting to add themes to my site for a while now so this came at the perfect time ^^

solaria 3 months ago

oh yes variables don't have to just be colors! I just meant a color had to be a valid color name. if you want to use an image you can do something like:

1 like
solaria 3 months ago

:root { --bg: url(cat.png);)} and then u can use var(--bg) anywhere you could put an image

1 like
owthehedge 3 months ago

makes sense, thank you!!

1 like

Website Stats

Last updated 1 week ago
CreatedFeb 14, 2022
Site Traffic Stats

Tags

rainbow html css space webdesign