How do Improve Compatibility with Browser Fallbacks

Tell us what’s happening:

Your code so far


<style>
  :root {
    --red-color: red;
  }
  .red-box {
    
    background-color: red;
    height: 200px;
    width:200px;
  }
  .red-box {
    
    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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36.

You should have only one selector for .red-box

please, can you explain further because i don’t understand

You already have the .red-box selector , you need to add there the fallback css rule, not create a new block for the same selector

thank you for the reply so far,i just tried this;
.red-box {
background-color : #FF0000;
background: var(–red-color, red);
height: 200px;
width:200px;
but i still can’t debug it

you are asked to still use red keyword to create the fallback rule
also, you will need to use the shorthand background instead of background-color

I have the same problem. I’ve texted everything like as in the assignment, but it isn’t work/ What’s wrong?
3

You don’t have to use the variable
Both your background color rules are useless if the browser doesn’t use variables

okay, I see.

Wokring code for samliks
.red-box {
    background: red; 
    background: var(--red-color);
    height: 200px;
    width:200px;
  }

thank you zacc,have seen the mistake