Learn CSS Variables by Building a City Skyline - Step 40

What is wrong with my code? plz help

every time i check code: its says >> You should apply a background to .bb1a
???
.bb1a {background: linear-gradient(–building-color1,–window-color1);
width: 70%;
height: 10%;

}

Challenge: Learn CSS Variables by Building a City Skyline - Step 40

Link to the challenge:

4 Likes

the colours are variables, which means you need to use var to reference each one.

4 Likes

alright, but how should i do that while i am supposed to put the two variables of colors inside the linear-gradient function !!! i’ve tried to associate the var with colors inside the linear-gradient but it didn’t work as before …

you haven’t shown your attempt so i can only show you this sample:

linear-gradient(var(—color1),var(—color2));
6 Likes

my attempt was as follows:
background: linear-gradient(var(–building-color1,–window-color1))

but now you have made it clear and i thank you so much for that.

Good day Hanaa.

1 Like

Found this solution very helpful! Thank you…

1 Like