Step 40 building a City Skyline

.bb1a {
width: 70%;
height: 10%;
background-color: var(–building-color1);
background: linear-gradient (–building-color1, --window-color1);
}

Hi,
I do not know why the above code is not working in this step. It says:
"## Test

Sorry, your code does not pass. Keep trying.

Hint

You should apply a background to .bb1a."

That is what I have done and do not know what to try next.

It might be because you have to use the var keyword to reference a variable. (Eg of how to do that is in the background-color line you posted above)

The root is as follows:
:root {
–building-color1: #aa80ff;
–building-color2: #66cc99;
–building-color3: #cc6699;
–building-color4: #538ccn6;
–window-color1: black;

So are’nt my variables already defined?

Yes they are defined.
I was trying to tell you that you need to use the var keyword just like you did in the previous step.

(Look at the line above the one you wrote to see it being used)

I tried that and it didn’t work

background: linear-gradient (var(–building-color1), var(–window-color1));
}

Worked it out! Thank you for your help.

1 Like

Sorry. I forgot I shouldn’t display the solutions here!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.