STEP 45 | Learn CSS Variables by Building a City Skyline

Requirement

Add 80% to the --building-color1 color of the .bb1d gradient so you can see it in action.

My code

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

Hint

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

I added 80% right after --building-color1 , but still not pass. Anyone could give me more hint ? Thanks

First, for clarity, it’s step 46 for me that has those instructions. Regardless, it looks like the issue is likely the extra comma after var(--window-color1)

  background: linear-gradient(
      orange,
      var(--building-color1) 80%,
      var(--window-color1),
    );

That comma results in the linear-gradient not rendering at all, and removing it should allow you to see the colors again (and pass the test.)

After I removed extra comma , after var(--window-color1) and removed the property background -color , I passed :slight_smile:

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