MAJOR FRUSTRATION! CSS Linear-Gradient Issue

Here is my Code:
.bb1a {
width: 70%;
height: 10%;
background-color: var(–building-color1);
background: linear-gradient(var(–building-color1, var(–window-color1));
Here is the instructions:

Step 40

Gradients in CSS are a way to transition between colors across the distance of an element. They are applied to the background property and the syntax looks like this:

gradient-type(
  color1,
  color2
);

In the example, color1 is solid at the top, color2 is solid at the bottom, and in between it transitions evenly from one to the next. In .bb1a, add a background property below the background-color property. Set it as a gradient of type linear-gradient that uses --building-color1 as the first color and --window-color1 as the second.

Here is the error I keep getting:
Sorry, your code does not pass. Hang in there.

You should apply a background to .bb1a right after the background-color.

PLEASE SOMEONE HELP!!

Welcome to the forum @Kentwork

Variable names start with double hyphens.
The first color needs a closing rounded bracket.

Happy coding

I just changed that and I am getting the same error still

Please post your entire code.

Actually after closing the bracket and updating the hyphes, I am now getting the following error:
Sorry, your code does not pass. Try again.

You should give the background a linear-gradient ending at var(--window-color1).

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

Place the comma after the round bracket.

Your code is showing single hyphens.

IDK why it copied that way. It was the comma, thank you!

1 Like

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