Hi..i need help its urgent

i need help with this code… It looks like a variable is being used to set the background color of the .red-box class. I’m told to increase browser compatibility by adding another background declaration right before the existing declaration and set its value to red.

Here’s the code


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

The property is supposed to be background and you need to set its value to red.
Does that help?

1 Like

background-color: red;

1 Like

@Nebula your answer is incorrect for this lesson. As @aditya_p responded/hinted, the property is supposed to be background and its value needs to be set to red

Her response is correct without giving away the answer in its entirety.

Thank you but it was actually @aditya-p who responded first with the correct solution.

--background: red;

or

--background: #F00;

Both are accepted by the test if placed directly above

background: var(--red-color);

Trying to get my head around how they are different than the proper answer that I did find.

It works because the regex used for the test is broken. It’s a bug, I made a PR for it.

1 Like

I get stuff from fedex sometimes too! :laughing: regex is over my head at my level of suck right now. Anyway, I was wondering what was happening. Thanks for the reply.

without reading properly reply urgently :rofl: