Learn CSS variables by Building a City Skyline - STEP 46

Hi, i cant pass this step. I think my code is good, but i cant pass.
Can somebody help me please?
Thanks a lot!


Step 46

You can specify where you want a gradient transition to complete by adding it to the color like this:

gradient-type(
  color1,
  color2 20%,
  color3
);

Here, it will transition from color1 to color2 between 0% and 20% of the element and then transition to color3 for the rest. Add 80% to the --building-color1 color of the .bb1d gradient so you can see it in action.


Here is my CSS code:

.bb1d {
width: 100%;
height: 70%;
background: linear-gradient(orange, var(–building-color1)80%, var(–window-color1)20%);
}


And here the result of test:

Test
Sorry, your code does not pass. Try again.

Hint
You should add a value of 80% to the --building-color1 color in the linear-gradient of .bb1d.

Your colors have only one dash in front of them. Retake a look at the instruction to see what they should look like.
Also, attach the link to the challenge.

Thanks for your answer.
The editor is showing my code bad: my code have two dashes. Sorry, about that. I paste my code again, i hope in a well format:

.bb1d {
  width: 100%;
  height: 70%;
  background: linear-gradient(orange, var(--building-color1)80%, var(--window-color1)20%);
}

Thanks again for your support.
Nicolás.

The instruction: " Add 80% to the --building-color1 color of the .bb1d gradient so you can see it in action."
No requirement for adding 20% to the second color.

1 Like

You are right! It works now.
Thanks a lot!
N.

1 Like