Learn CSS Variables by Building a City Skyline - Step 104

Tell us what’s happening:

Have tried removing the 0% and 5%
I think it might be a space i’m using somewhere, but have have not been able to find it.

   var(--building-color2) 0% 5%, 
   transparent 5% 10%
   );

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36

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

Link to the challenge:

You need to write only one percentage per color

I have tried that. and didn’t work
here are the variations i tried

    var(--building-color2) 5%, 
    transparent 10%
    );

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

I have tried that. and didn’t work
here are the variations i tried

background: repeating-linear-gradient(
    var(--building-color2) 0%, 
    transparent 10%
    );
``` and

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

you need to set start and end for each color, so each color should be repeated twice

Thank you that worked. I’m confused though. A few steps ago when i tried that on a similar exercise it was wrong. I know there are many ways to do the same thing, but which way is the best or “semantic” way?

it depends on what you need to do, see documentation on linear-gradient and linear-gradient-repeat