Your .red-box rule should include a fallback with the background set to red immediately before the existing background declaration?

Tell us what’s happening:

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36.

Remember CSS stands for cascading style sheet.

Values that are put down the lines have precedence over the same values before.

So, you can simply declare background: red on the previous line.

sorry can you explain this in more detail? I didn’t get your point.

thank you

Refer to this post as it deals with the same problem