Learn-css-variables-by-building-a-city-skyline - Step 51

Step 51

Gradient transitions often gradually change from one color to another. You can make the change a solid line like this:

linear-gradient(
  var(--first-color) 0%,
  var(--first-color) 40%,
  var(--second-color) 40%,
  var(--second-color) 80%
);

Add a linear-gradient to .bb2b that uses --building-color2 from 0% to 6% and --window-color2 from 6% to 9%.

MY CODE:

.bb2b {
  width: 100%;
  height: 100%;
  background:linear-gradient(
    var(--building-color2)0% ,
    var(--building-color2)6%,
    var(--window-color2)6% ,
    var(--window-color2)9%,
  );
}

my code does not pass…i think i followed the instruction fairly.PLEASE HELP

1 Like

shouldnt have a comma at the end

2 Likes

thank you and i tried that now its telling me that i should i give it a background property, like its not there already!!!

oh thanks , i finally figured it out… it was a spacing mistake and the comma too. Happy coding !!
:slight_smile:

3 Likes