Learn CSS Variables by Building a City Skyline - Step 104

Tell us what’s happening:
Hi, could anyone here explain why this error happen?

Your code so far

.fb5 {
  width: 10%;
  height: 33%;
  background-color: var(--building-color2);
  position: relative;
  right: 10%;
  background: repeating-linear-gradient(
      90deg,
      var(--building-color2) 0%, 
      var(--building-color2) 5%,
      transparent 5%, 
      transparent 10% 
    );
}

but that code didn’t work and it keep telling me this:
“Hint: You should give the repeating-linear-gradient a first color of --building-color2 from 0% to 5%

So, what went wrong?

Your browser information:

User Agent is: Edge/107.0.1418.42

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

Link to the challenge:

Thank you!

Check the instructions… did they ask for a specific gradient direction?

1 Like

i’ve solved it by putting background-color property above the background property like this:


background-color: var(–building-color2);
background: repeating-linear-gradient(
var(–building-color2) 0%,
var(–building-color2) 5%,
transparent 5%,
transparent 10%

and also you’re right, they didn’t ask the grad-direction so i removed it and it works.

thank you!

2 Likes

Thanks for the tip. I was having exactly the same problem and resolved it just like you showed. :+1:

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