title: How to get the background color of element within CSS file?
body: <p>I have an animation in my application, and I also have a dark mode theme.
  The animation have the following transitions, inside @keyframes : <br>
  (It has more phases, but it's irrelevant for my question)</p>
  <pre><code>0% {
      transform: rotateX(0);
      background: #fff;
      border-color: black;
      }
  
  45% {
      transform: rotateX(90deg);
      background: #fff;
      border-color: black;
      }
  </code></pre>
  <p>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</p>
  <pre><code>  background: var(--background-color);
  </code></pre>
  <p>(When I declare --background-color to be the current background color) <br>
  What is the right way to do it?</p>