I have an animation in my application, and I also have a dark mode theme.
The animation have the following transitions, inside @keyframes :
(It has more phases, but it's irrelevant for my question)
0% {
transform: rotateX(0);
background: #fff;
border-color: black;
}
45% {
transform: rotateX(90deg);
background: #fff;
border-color: black;
}
I want to change the background property, so it will check what is the background color right now, and then apply the same value. Something like
background: var(--background-color);
(When I declare --background-color to be the current background color)
What is the right way to do it?