Tell us what’s happening:
Task To DO:
It looks like a variable is being used to set the background color of the .red-box
class. Let’s improve our browser compatibility by adding another background
declaration right before the existing declaration and set its value to red.
What I did:
I did insert fallback inline, just like the previous lesson asked to do, as you see below, didn’t work. I need to declare/add another seperate “background: red;” for this to work. I guess the lesson right before this, make this confusing.
Here is a snapshot from the lesson:
Lesson title: “Basic CSS: Attach a Fallback value to a CSS Variable”
Here’s how you do it:
background: var(–penguin-skin, black);
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36
.
Link to the challenge: