Hey, my front-end-friends!
There are many css tutorials and code-snippets out there, but maybe you got a topic that is not covered or just didn't find the right solution?
Tell me in the comments, what you would like to know about CSS.
Hopefully I later can explain it in a short posting or other nice web-devs will give you some hints/links/examples.
Let's share our knowledge! π
Top comments (3)
Iβm working on a dark mode and itβs going well with css var() but Iβm trying to have different background-image() for light and dark. But I canβt seem to figure it out.
Iβve got a work around now using and opacity but itβs not very clean.
Thanks
I guess, you try to set the background-image with a custom property like:
And later try to set the image with
is that correct?
Custom Properties behave different than variables in e.g. JS.
In CSS custom properties, you need to store a value, that is a valid CSS value.
So this should work:
I hope, I could help you with your problem!
Of not, please explain a bit more details and add a code example.
I want to know, what happened to CSS shaders π