Thinking about Improve Compatibility with Browser Fallbacks

Tell us what’s happening:
I was wondering if it really is necessary or why is it necessary to add a variable only to have different code defining the same background color that both older and newer browsers can read.

Your code so far


<style>
:root {
  --red-color: red;
}
.red-box {
  background:red;
  background: var(--red-color);
  height: 200px;
  width:200px;
}
</style>
<div class="red-box"></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0.

Challenge: Improve Compatibility with Browser Fallbacks

Link to the challenge:

I think because of speed, if computer knows that variable first it runs smoothly or faster if the variable define through out the code. Its just my opinion I dont have evidence. :smile: